I think you misunderstood what i was asking. Let me illustrate with my code.
private displayQueueGrid(data) {
this.id= 'queuegrid'
this.gridOptions = {
autoCommit:true,
dataSource: data,
dataSourceType:"json",
width:"1000px",
height:"400px",
autoGenerateColumns:false,
columns:[
{ key: "t", headerText: "Title", width:"250px", dataType:"string" },
{ key: "s", headerText: "Status", width:"100px", dataType:"string" },
{ key: "y", headerText: "Type", width:"100px", dataType:"string" },
{ key: "d", headerText: "Submitted Date", width:"250px", dataType:"string" },
{ key: "e", headerText: "Expires In", width: "80px", dataType: "string" },
{ key: "id", headerText: "ItemID", dataType: "string", hidden: true },
{ key: "m", headerText: "Error", dataType: "string", hidden: true }
],
features: [{
name: "RowSelectors",
enableCheckBoxes: true,
enableRowNumbering: false,
checkBoxStateChanging: function (evt, ui) {
//we use this variable as a flag whether the selection is coming from a checkbox
this.isFiredFromCheckbox = true;
alert('checkBoxStateChanged fired' + this.isFiredFromCheckbox );
},
checkBoxStateChanged: function (evt, ui) {
console.log(evt, ui);
alert('checkBoxStateChanged fired' + evt + ui);
}
},
{
name: "Selection",
mode: 'row',
multipleSelection: true,
persist: true,
activation: true,
rowSelectionChanging: function (evt, ui) {
if (this.isFiredFromCheckbox) {
alert('Event fired from checkbox');
console.log('this is the rowselect'+ evt, ui);
this.isFiredFromCheckbox = false;
}
else {
return false;
}
}
},
]
};
this.showGrid = true;
}
This is the iggrid funtion i have in place. As you see i have hidden 2 columns, namely id and m keys.
So when the grid is rendered and a use clicks on one of the checkboxes which i have enabled in the grid i need to capture the id and error message even though it is hidden.
similarly when a users clicks on the checkbox on multiple rows i want to get a list of all the id's and error.
I am using Angular 2 with typescript with ignite UI to do this.It would be helpful if you can answer the question on typescript.
Please let me know if this was clear.