function rowDoubleSelectVersion(args) { var data = args.data; var objGridLinked = $("#GridDocumentExpandVersions").ejGrid("instance"); console.log('current items ' + objGridLinked.getCurrentViewData()); var currentItemsGrid = objGridLinked.getCurrentViewData(); console.log('current items size ' + currentItemsGrid.length); var newItemsGrid = _.remove(currentItemsGrid, { 'OrderID': data.OrderID }); console.log('items available ' + currentItemsGrid.length); if (currentItemsGrid.length>0) objGridLinked.dataSource(currentItemsGrid); objGridLinked.refreshContent(); } |
function rowDoubleSelectVersion(args) { var data = args.data; var objGridLinked = $("#GridDocumentExpandVersions").ejGrid("instance"); console.log('current items ' + objGridLinked.getCurrentViewData()); var currentItemsGrid = objGridLinked.model.dataSource; console.log('current items size ' + currentItemsGrid.length); var newItemsGrid = _.remove(currentItemsGrid, { 'OrderID': data.OrderID }); console.log('items available ' + currentItemsGrid.length); objGridLinked.dataSource(currentItemsGrid); //objGridLinked.refreshContent(); } |