ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: kshipra on March 04, 2017, 01:08:46 am
-
how can i render in grid on first time load , the whole row as readonly?
right now I pasted same callback function for each column in row to make entire row readonly. Is there more cleaner and efficient way to do this?
e.g.
{
title: "Definition",
editor: { type: 'textarea', attr: 'rows=5' },
width: 350,
dataIndx: "Definition",
filter: { type: 'textbox', condition: 'contain', listeners: ['keyup'] },
editable: function (ui) {
if (ui.rowData['IsBaseEvent'] === true) {
return false;
} else {
return true;
}
}
},
{
title: "Notes",
editor: { type: 'textarea', attr: 'rows=5' },
width: 350,
dataIndx: "Notes",
filter: { type: 'textbox', condition: 'contain', listeners: ['keyup'] },
editable: function (ui) {
if (ui.rowData['IsBaseEvent'] === true) {
return false;
} else {
return true;
}
}
}
-
There is no need to specify editable for every column.
There is a global editable option for rows. https://paramquery.com/pro/api#option-editable
editable: function (ui) {
if (ui.rowData['IsBaseEvent'] === true) {
return false;
} else {
return true;
}
}