I have a checkbox column to select multiple row. All of the other fields are read only. The issue is I don't want the edit row to show. I have to enable it in order to get the checkbox to work but when I select the checkbox the entire row goes into edit mode. Is there a way to bypass this feature? Or have it auto close after the checkbox is checked?
Try changing the editMode to "cell" under the Updating feature.
Then change the other cells to read only.
Example below:
features: [
{
name:
"Updating"
,
editMode: "cell",
columnSettings: [
columnKey :
"Name"
readOnly:
true
},
"whatever"
}
]
Or you might be able to enable the RowSelectors Feature and the Selection feature with no updating feature required. Let the RowSelctors checkbox provide the checkbox for your selections.
{ name:"RowSelectors", enableCheckBoxes: true, enableRowNumbering: false, requireSelection: false},
{ name:'Selection', mode: 'row', multipleSelection: true, activation: true }
The cell thing worked on the level of not having the row edit show but if you don't click off of the cell then it will not remain checked. Pretty much the same behavior of the overall row edit with out the row editing feature. This really need to behave like any other checkbox. Possibly not a feature?
Did you try the RowSelectors Feature? That is what I use for selecting a row or multiple rows for my users. It works great.
Add the RowSelectors feature and Selection feature:
{ name:"RowSelectors", enableCheckBoxes: true, enableRowNumbering: false, requireSelection: false },
Example code for getting the values from the selected rows:
MST.WOD_dispatchOrderGrid is my grid selector.
var jobs = [];
var jobs = MST.WOD_dispatchOrderGrid.igGridSelection("selectedRows");
if (jobs.length == 0) {
loadStandardErrorMessageDialog("Select at least one job");
return false;
var dataview = MST.WOD_dispatchOrderGrid.data('igGrid').dataSource.dataView();
var selectedJobs = new Array();
var verifyAccountID = "";
$.each(jobs, function (key, val) {
if (verifyAccountID == "" || dataview[val.index]["AccountID"] == verifyAccountID) {
selectedJobs.push({
"JobID": dataview[val.index]["JobID"],
"AccountID": dataview[val.index]["AccountID"],
"CompanyID": dataview[val.index]["CompanyID"],
"Status": dataview[val.index]["Status"],
"SkillLevelRank": dataview[val.index]["SkillLevelRank"]
});
verifyAccountID = dataview[val.index]["AccountID"];
else {
loadStandardErrorMessageDialog("Select only one Account at a time");