1. #281
    Sencha User
    Join Date
    Mar 2013
    Posts
    10
    Vote Rating
    0
    prabhum103 is on a distinguished road

      0  

    Default Dynamically adding columns to the grid

    Dynamically adding columns to the grid


    Hi , I want to Dynamically adding columns to the grid.

    I am trying to use applyColumns() . But it is not adding columns.

    What is the issue?

    Thanks,
    Prabhu M

  2. #282
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by prabhum103 View Post
    Hi , I want to Dynamically adding columns to the grid.

    I am trying to use applyColumns() . But it is not adding columns.

    What is the issue?

    Thanks,
    Prabhu M
    Don't use applyColumns, use setColumns.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #283
    Sencha User
    Join Date
    Mar 2013
    Posts
    10
    Vote Rating
    0
    prabhum103 is on a distinguished road

      0  

    Default


    how to define a column? could you please give me an example ?

  4. #284
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by prabhum103 View Post
    how to define a column? could you please give me an example ?
    Um... there are several examples available in the git repo
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #285
    Sencha User
    Join Date
    Jan 2010
    Posts
    8
    Vote Rating
    0
    phweeyee is on a distinguished road

      0  

    Default


    Hi,

    Any sample codes for adding of new rows to the grid?

  6. #286
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by phweeyee View Post
    Hi,

    Any sample codes for adding of new rows to the grid?
    The grid (and a normal List or DataView) will display exactly what is in the store. So if you want to add a new row to the grid, you have to add a new record to the store.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  7. #287
    Sencha User
    Join Date
    Jul 2013
    Posts
    1
    Vote Rating
    0
    anshus is on a distinguished road

      0  

    Default


    All are Drag and Drop methods Why you dont make Examples in each component ? instead of code make the steps correctly please beginners cant follow this........

  8. #288
    Sencha User
    Join Date
    Nov 2011
    Posts
    16
    Vote Rating
    0
    varois is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    The grid (and a normal List or DataView) will display exactly what is in the store. So if you want to add a new row to the grid, you have to add a new record to the store.
    In my code i do have to call grid.doRefresh(), after add a new record to the grid store and it works for me.

  9. #289
    Sencha User
    Join Date
    Jan 2010
    Posts
    8
    Vote Rating
    0
    phweeyee is on a distinguished road

      0  

    Default


    Thanks.

    However, the added row will only be displayed when I click on the header. Same when I first load the table, I have to click on the header once for the initial data from a store to be loaded. Any idea how to solve this problem?

  10. #290
    Sencha User
    Join Date
    Jan 2010
    Posts
    8
    Vote Rating
    0
    phweeyee is on a distinguished road

      0  

    Default


    Hi dlogic,

    I am having the same problem as you. Have you got the solution to your question?