1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    6
    Vote Rating
    0
    radmila80 is on a distinguished road

      0  

    Default Configure dynamic columns in gridpanel

    Configure dynamic columns in gridpanel


    How can I set column property of gridpanel to accept dynamic variable using Architect? I have a working extjs code (non-Architect) that defines column property like this:

    var grid = Ext.create('Ext.grid.Panel', {
    columns: {
    items: gridColumns

    where gridColumns is some variable I create when i get json from the server.

    I need to recreate this code into Architect, but column property seems to always require at least one field to be present. Is there a way to set column property in Architect same way as I set it in non-Architect code?

    Thank you.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,185
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      1  

    Default


    radmila80 -

    You can either dynamically call the reconfigure method to inject new columns or you can create an override and replace the columns.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    6
    Vote Rating
    0
    radmila80 is on a distinguished road

      0  

    Default


    Thank you for a quick reply. I do call grid reconfig to populate dynamic columns. I was looking for a way to make code less confusing and not having to declare unused column definition. My coworker suggested to manually update metadata file but we are not sure if it is a good idea.