Results 1 to 6 of 6

Thread: Loading data on grid

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    36

    Default Loading data on grid

    Hi,,

    I am facing problem on loading data on grid.
    When I run my application ,the data on first tab is loading.
    When I click on second tab and then by clicking on first tab the loaded data has disappeared.

    Is there any thing I have missed when declaring the grid?

    Please solve my problem .....

  2. #2
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64

    Default

    just post some code!

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    36

    Default

    {
    xtype : 'gridpanel',
    id : 'gridId',
    width : '100%',
    height : 30,
    enableColumnHide : false,
    sortableColumns : true,
    autoScroll : true,
    plugins : [ Ext.create('Ext.ux.grid.GridHeaderFilters') ],
    viewConfig : {
    id : 'ds',
    trackOver : false,
    stripeRows : true
    },
    columns : [{
    header : 'First Name',
    width : 100,
    dataIndex : 'firstName',

    }, {
    header : 'Last Name',
    width : 100,
    dataIndex : 'lastName',

    }],
    store : 'driver.DriverDetails'
    }

    This is the grid which shows first name and last name of driver when I click on first tab.
    But when I click on second tab and again I click on first tab the data is not loaded to grid.
    It is displaying grid with empty data.

    Please give some solution as soon as possible.........

  4. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,102
    Answers
    113

    Default

    Dont use extra commas. Firefox accepts them but IE will cause an error:

    Code:
    dataIndex : 'lastName',
    Also post code for your tabpanel and please use CODE tages (# button when you are typing your message)

  5. #5
    Sencha User
    Join Date
    Jan 2012
    Posts
    36

    Default

    Yes,

    This one is type mistake .

    I'll not do such silly mistake.
    Can you give me the solution?

  6. #6
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,102
    Answers
    113

    Default

    From the grid code, I wasnt able to find any problem. Post your whole code (tabpanel and whats in the other tab).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •