Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Exit EndEdit mode on selection
posted

Hi,

I have developed ig grid with following features : -

$("#grid").igGrid({
height: "650px",
primaryKey: "Group",
autoGeneratedColumns: false,
autoCommit: true,
aggregateTransactions: true,
renderCheckboxes: true,
dataSource: window.top.gridData.data,
dataSourceType: "json",
columns: window.top.gridData.gridColumns,
features: [{
name: "Responsive",
enableVerticalRendering: false
},
{
name: "Updating",
enableAddRow: false,
enableDeleteRow: false,
showReadonlyEditors: true,
showDoneCancelButtons: false,

editMode: "row",
columnSettings: [
{
columnKey: "Group",
readOnly: true
}
]
},
editRowEnded: function (evt, ui) {
// editCellStarted: function(evt, ui) {

 var transactions = $("#grid").igGrid("allTransactions");

 for (var i = 0; i < transactions.length; i++) {

console.log(transactions[i]);

//}

},
}]
});
In my case if I select row by clicking the checkbox it enters in edit mode but for selection I need to enter it then only it gets selected.
I just want to get my row selected when I select it.
I tried to exit it by following code on other button click event:
$("#grid").igGridUpdating("endEdit",true); 
but this code is throwing "cannot call methods on igGridUpdating prior to initialization; attempted to call method 'endEdit'" error on button click.
Thanks in Advance
  • 1080
    Offline posted

    Hello,

    Thank you for posting in our community.

    In order to get the selected row when clicking the checkbox, the rowSelectionChanged event can be handled.

    I have created and attached a small sample for your reference.

    Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me.

    Looking forward to hearing from you.

    4670.Sample.zip