Sep 01, 2016, 3:08 PM
[CLOSED] Issue with Store.loadData method - Refreshing GridPanel
Hello Guys,
I am facing issue with Store.loadData call in the javascript code.
Objective:
On Index page, I have a grid panel along with a button. On click of Button, Window appears with form fields. When I enter valid data and click on Save Button. I have to refresh the Grid Panel on Index page to view the newly entered data, keeping Popup window opened so that user can immediately enter another record.
I am able to do everything said above.
Issue:
On grid panel(Index) I have two date columns, which does not get populated when I refresh my grid using below code in my JavaScript.
Do you know to resolve this problem?
Thanks,
Puneet
I am facing issue with Store.loadData call in the javascript code.
Objective:
On Index page, I have a grid panel along with a button. On click of Button, Window appears with form fields. When I enter valid data and click on Save Button. I have to refresh the Grid Panel on Index page to view the newly entered data, keeping Popup window opened so that user can immediately enter another record.
I am able to do everything said above.
Issue:
On grid panel(Index) I have two date columns, which does not get populated when I refresh my grid using below code in my JavaScript.
$.ajax({
cache: false,
async: true,
type: "POST",
url: '@Url.Action("Save", "Home")',
data:{ name: $('#name').val() },
success: function (data) {
App.Store2.removeAll(false);
App.Store2.loadData(data);
}
});
Here data returned is of same List which is assigned to DataSource in Gridpanel.Store on index page. but when I see data in debugger I see it date property is returned as date_written:"/Date(1475121600000)/"
In GridPannel.Store if I set the Modelfield with Type string I do see the value in the column but rendered as same as 1475121600000.Do you know to resolve this problem?
Thanks,
Puneet
Last edited by fabricio.murta; Oct 10, 2016 at 8:58 PM.