Title: How can I capture the changed cell value when I click anywhere outside the cell Post by: wolfnbasti on May 22, 2014, 08:31:03 PM I use the following to create a editable datagrid:
var attributeDefs; var resources; var resourceDef; var attributeValues; var attributeIds; $(function() { $.ajax({ url: '../rest/...../attributes', type: "GET", }).done(function(data) { attributeDefs = data.attributeDefs; resourceDef = data.resourceDef; resources = data.resources; attributeValues = data.attributes.values; attributeIds = data.attributes.ids; var frozenColumns = []; frozenColumns.push({ field: '0', title: 'Name', align: 'left', width: 100, resizable: true, editable: true, fixed: false, }); var columns = []; columns.push({ field: '0', title: 'Name', align: 'left', width: 100, resizable: true, editable: true, fixed: false }); for (var i = 0; i < attributeDefs.length; i++) { columns.push({ field: (i + 1).toString(), title: attributeDefs.name, align: 'left', width: 100, resizable: true, fixed: false, editable: true, editor: 'text', }); } var rows = []; for (var i = 0; i < resources.length; i++) { var attributeObject = {'0' : resources.name}; for (var j = 0; j < attributeDefs.length; j++) { attributeObject[(j + 1).toString()] = attributeValues[j]; } rows.push(attributeObject); } $('#ClientData').edatagrid({ columns: [columns], data: rows, editable: true, fitColumns: true, singleSelect: true, nowrap: true, striped: true, onDblClickCell: function(row, field, value) { } }); }); }); <table id="ClientData" title="Attributes" class="edatagrid" style="width:1200px;height:600px" toolbar="#toolbar" fitColumns="true" editable="true" ></table> I need to capture the value of the changed cell after the onDblClickCell line as soon as the user clicks anywhere else in the grid or out of it. Any ideas how this might be done? Thanks. Title: Re: How can I capture the changed cell value when I click anywhere outside the cell Post by: stworthy on May 23, 2014, 12:03:32 AM You can bind any events to the editor when a row goes into edit mode.
Code: $('#tt').edatagrid({ |