Disable columns under certain condition










2















I need to disable/enable to input some columns under certain conditions, can I do it with tabulator?
Columns available or locked to input when I open page with table with some state (boolean or etc). Thank you.



example:



//define some sample data
var tabledata = [
id: 1,
name: "Oli Bob",
age: "12",
col: "red",
dob: ""
,

id: 2,
name: "Mary May",
age: "1",
col: "blue",
dob: "14/05/1982"
,

id: 3,
name: "Christine Lobowski",
age: "42",
col: "green",
dob: "22/05/1982"
,

id: 4,
name: "Brendon Philips",
age: "125",
col: "orange",
dob: "01/08/1980"
,

id: 5,
name: "Margret Marmajuke",
age: "16",
col: "yellow",
dob: "31/01/1999"
,
];

var table_3 = new Tabulator("#table_3",
height: 205,
data: tabledata,
layout: "fitColumns",
columns: [
title: "Name",
field: "name",
width: 150,
editor: "input"
,

title: "Age",
field: "age",
align: "left",
formatter: "progress",
editor: "input"
,

title: "Favourite Color",
field: "col",
editor: "input"
,

title: "Date Of Birth",
field: "dob",
sorter: "date",
align: "center",
,
],
);


How can I disable "editor: "input"" under certain conditions?










share|improve this question
























  • Hi and welcome to SO. Please edit the question to show what you've tried. Like this we will be able to better understand your problem/question and thus we will be able to better help you. It is best to provide a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the Tour.

    – quant
    Nov 16 '18 at 7:28











  • I found a solution: tabulator.info/docs/4.1/edit "Optional Editing"

    – n4ks
    Nov 16 '18 at 10:44















2















I need to disable/enable to input some columns under certain conditions, can I do it with tabulator?
Columns available or locked to input when I open page with table with some state (boolean or etc). Thank you.



example:



//define some sample data
var tabledata = [
id: 1,
name: "Oli Bob",
age: "12",
col: "red",
dob: ""
,

id: 2,
name: "Mary May",
age: "1",
col: "blue",
dob: "14/05/1982"
,

id: 3,
name: "Christine Lobowski",
age: "42",
col: "green",
dob: "22/05/1982"
,

id: 4,
name: "Brendon Philips",
age: "125",
col: "orange",
dob: "01/08/1980"
,

id: 5,
name: "Margret Marmajuke",
age: "16",
col: "yellow",
dob: "31/01/1999"
,
];

var table_3 = new Tabulator("#table_3",
height: 205,
data: tabledata,
layout: "fitColumns",
columns: [
title: "Name",
field: "name",
width: 150,
editor: "input"
,

title: "Age",
field: "age",
align: "left",
formatter: "progress",
editor: "input"
,

title: "Favourite Color",
field: "col",
editor: "input"
,

title: "Date Of Birth",
field: "dob",
sorter: "date",
align: "center",
,
],
);


How can I disable "editor: "input"" under certain conditions?










share|improve this question
























  • Hi and welcome to SO. Please edit the question to show what you've tried. Like this we will be able to better understand your problem/question and thus we will be able to better help you. It is best to provide a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the Tour.

    – quant
    Nov 16 '18 at 7:28











  • I found a solution: tabulator.info/docs/4.1/edit "Optional Editing"

    – n4ks
    Nov 16 '18 at 10:44













2












2








2








I need to disable/enable to input some columns under certain conditions, can I do it with tabulator?
Columns available or locked to input when I open page with table with some state (boolean or etc). Thank you.



example:



//define some sample data
var tabledata = [
id: 1,
name: "Oli Bob",
age: "12",
col: "red",
dob: ""
,

id: 2,
name: "Mary May",
age: "1",
col: "blue",
dob: "14/05/1982"
,

id: 3,
name: "Christine Lobowski",
age: "42",
col: "green",
dob: "22/05/1982"
,

id: 4,
name: "Brendon Philips",
age: "125",
col: "orange",
dob: "01/08/1980"
,

id: 5,
name: "Margret Marmajuke",
age: "16",
col: "yellow",
dob: "31/01/1999"
,
];

var table_3 = new Tabulator("#table_3",
height: 205,
data: tabledata,
layout: "fitColumns",
columns: [
title: "Name",
field: "name",
width: 150,
editor: "input"
,

title: "Age",
field: "age",
align: "left",
formatter: "progress",
editor: "input"
,

title: "Favourite Color",
field: "col",
editor: "input"
,

title: "Date Of Birth",
field: "dob",
sorter: "date",
align: "center",
,
],
);


How can I disable "editor: "input"" under certain conditions?










share|improve this question
















I need to disable/enable to input some columns under certain conditions, can I do it with tabulator?
Columns available or locked to input when I open page with table with some state (boolean or etc). Thank you.



example:



//define some sample data
var tabledata = [
id: 1,
name: "Oli Bob",
age: "12",
col: "red",
dob: ""
,

id: 2,
name: "Mary May",
age: "1",
col: "blue",
dob: "14/05/1982"
,

id: 3,
name: "Christine Lobowski",
age: "42",
col: "green",
dob: "22/05/1982"
,

id: 4,
name: "Brendon Philips",
age: "125",
col: "orange",
dob: "01/08/1980"
,

id: 5,
name: "Margret Marmajuke",
age: "16",
col: "yellow",
dob: "31/01/1999"
,
];

var table_3 = new Tabulator("#table_3",
height: 205,
data: tabledata,
layout: "fitColumns",
columns: [
title: "Name",
field: "name",
width: 150,
editor: "input"
,

title: "Age",
field: "age",
align: "left",
formatter: "progress",
editor: "input"
,

title: "Favourite Color",
field: "col",
editor: "input"
,

title: "Date Of Birth",
field: "dob",
sorter: "date",
align: "center",
,
],
);


How can I disable "editor: "input"" under certain conditions?







javascript tabulator






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 9:51









barbsan

2,54561524




2,54561524










asked Nov 16 '18 at 7:19









n4ksn4ks

235




235












  • Hi and welcome to SO. Please edit the question to show what you've tried. Like this we will be able to better understand your problem/question and thus we will be able to better help you. It is best to provide a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the Tour.

    – quant
    Nov 16 '18 at 7:28











  • I found a solution: tabulator.info/docs/4.1/edit "Optional Editing"

    – n4ks
    Nov 16 '18 at 10:44

















  • Hi and welcome to SO. Please edit the question to show what you've tried. Like this we will be able to better understand your problem/question and thus we will be able to better help you. It is best to provide a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the Tour.

    – quant
    Nov 16 '18 at 7:28











  • I found a solution: tabulator.info/docs/4.1/edit "Optional Editing"

    – n4ks
    Nov 16 '18 at 10:44
















Hi and welcome to SO. Please edit the question to show what you've tried. Like this we will be able to better understand your problem/question and thus we will be able to better help you. It is best to provide a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the Tour.

– quant
Nov 16 '18 at 7:28





Hi and welcome to SO. Please edit the question to show what you've tried. Like this we will be able to better understand your problem/question and thus we will be able to better help you. It is best to provide a Minimal, Complete, and Verifiable example. For more information, please see How to Ask and take the Tour.

– quant
Nov 16 '18 at 7:28













I found a solution: tabulator.info/docs/4.1/edit "Optional Editing"

– n4ks
Nov 16 '18 at 10:44





I found a solution: tabulator.info/docs/4.1/edit "Optional Editing"

– n4ks
Nov 16 '18 at 10:44












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53333150%2fdisable-columns-under-certain-condition%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53333150%2fdisable-columns-under-certain-condition%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

27

Top Tejano songwriter Luis Silva dead of heart attack at 64

Category:Rhetoric