Hi,
I am getting data using ajax and then show it on client using igGrid using following method -
$.ig.loader(function () {
var data = eval(FirstGrid.getJsonDataTable().value); $("#grid").igGrid({ autoGenerateColumns: false, columns: [ {headerText: "Dosage D", key: "Dosage", width: "150px", dataType: "string" }, {headerText: "Drugg", key: "Drug", width: "150px", dataType: "string"}, {headerText: "Patient Name", key: "Patient", width: "150px", dataType: "string"} ], width: 700, dataSource: data, features: [ { name: 'Updating' } ] }); });
My data display fine and then user update data by clicking on the grid cell. My page has also input button as follows -
<input type = "button" value ="Save" onclick ="SaveChanges()" />
function SaveChanges() { var ds = $("#grid").igGrid("option", "dataSource");
}
on putting break point on the SaveChanges method, and getting data, i find out this is old data and not a copy of update data. Is there is way in infraguistics to get the updated data.
I do not want to attached this whole process to url or something, I want to get json data from the server and bind it to the grid and then in the end get the updated data back. Because my page has other data and grid data is a sub-set of whole data.
Thanks,
Daljit Singh
I want to render igGrid and igDataChart to render in same page. I am using ig.JSOPDataSource to get the data from my REST service, if i am using same datasource variable for creating grid and chart only one component is rendering. How to share this datasource object across jquery controls.
We need solution in jquery api. we should not call same webservice twice.
Thanks in Advance.
-Sekhar.
Hi Daljit,
you need to set autoCommit to true in order to get the data updated immediately in the data source. if you don't set it ( and false is its default value), the data source will have the old data and you can retrieve the updates by getting the transactions from the data source /grid APIs:
http://help.infragistics.com/jQuery/2012.2/ui.iggrid => methods = > pendingTransactions
Please refer to the following help topic for information on how to perform updates:
http://es.infragistics.com/help/topic/88cc9763-ce79-4ed8-8da3-c34a61e5a96d
Hope it helps. Thanks,
Angel