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
115
igGrid, DataSource and update datasource automatically.
posted

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