[CLOSED] Issue with Store.loadData method - Refreshing GridPanel

  1. #1

    [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.

     $.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.
  2. #2
    Hello Puneet!

    Well, it is not very clear how your scenario is built but I can believe you are loading the grid with the data in one format and then trying to refresh it with the data in a different format than the one initially used, so it can't infer the conversion. You probably want to standardize the DateFormat setting in both the initial date and the field used to edit the value.

    This example illustrates a static data loading from a DirectEvent that explicitly specifies the format used in raw data: GridPanel - ArrayGrid - Remote Load.

    If this does not help at all, provide us a test case so we can know exactly what's happening there.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello @mwiater!

    It's been some days since we posted a follow-up to this thread and you still didn't reply. Do you still need assistance on this issue? If not, we'll be marking it as closed within 7 days. You will be able to post follow-ups even when the thread is marked as closed, though.

    We're looking forward for your feedback.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Store Sync() Method Big Issue
    By shaileshsakaria in forum 2.x Help
    Replies: 10
    Last Post: Jan 14, 2013, 8:00 AM
  2. Store.LoadData method
    By madeofrose in forum 2.x Help
    Replies: 0
    Last Post: Oct 01, 2012, 9:16 PM
  3. About Ext.Net Store.loadData
    By caoit in forum 1.x Help
    Replies: 0
    Last Post: Apr 26, 2011, 2:41 AM
  4. Ext.Net Store.loadData
    By cleve in forum 1.x Help
    Replies: 4
    Last Post: Jun 29, 2010, 4:19 PM
  5. [CLOSED] gridpanel width/height refreshing issue
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 02, 2009, 5:29 PM

Posting Permissions