1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Illinois
    Posts
    32
    Vote Rating
    0
    Joshua093 is on a distinguished road

      0  

    Default Unanswered: Trigger Grid AutoFill on reload

    Unanswered: Trigger Grid AutoFill on reload


    Currently I have a grid (columns are resizable) that is being used to store some addresses and the user has to go to another view to edit this information, so I hide the grid and show the other view.

    When they save the new address information and I show the grid again I am using reconfigure to update the information so I don't have to remove the grid and rebuild it completely. My problem is that my grid width is dynamic so I am using grid.getView().setAutoFill(true); when creating the grid, but this doesn't get triggered on reconfigure so all of the columns go back to my default width, which I don't want.

    Is there a way to make the Auto Fill be triggered on reconfigure?

    Code:
    public void createGrid(ListStore<SubmissionIndividualVO> store) {    
        createColumnModel(); // Create a new columnModel every time so the old one isn't used
        if(grid == null){ // Only create the grid once
            grid = new Grid<SubmissionIndividualVO>(store, columnModel);
            grid.setBorders(true);
            grid.setStripeRows(true);
            grid.setAutoHeight(true);
            grid.setColumnLines(true);
            grid.getView().setAutoFill(true);
            grid.getView().setForceFit(true);
            getContentPanel().add(grid);
        }else{
            grid.reconfigure(store, columnModel);
        }
    }

  2. #2
    Sencha User
    Join Date
    Nov 2009
    Posts
    51
    Answers
    1
    Vote Rating
    0
    smiletolead is on a distinguished road

      0  

    Default


    Hi Joshua

    The problem you are facing is not clear. If you provide a simple and complete prototype, it will be helpful for others to try it out and help you

    Regards
    Ganesh

  3. #3
    Sencha User
    Join Date
    May 2011
    Location
    Illinois
    Posts
    32
    Vote Rating
    0
    Joshua093 is on a distinguished road

      0  

    Default


    I have not had time to modify my code to make it have an entry point yet (we just rolled our product into production, so it's hectic around here) so here is a concise explanation of the problem.

    I have a grid in a view that can be resized. In the column model I set the width of the columns so I can fall back on these if I need. When I load the grid I call the setAutoFill method, which by definition says

    "True to auto expand the columns to fit the grid when the grid is created."

    When I call reconfigure on my grid it then goes back to the default width because auto fill only executes when the grid is created, and reconfigure doesn't recreate the grid.

    Is there an easy to implement way of making the grid's columns auto fill if the grid has already been created?

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar