1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    9
    Vote Rating
    0
    alessalessio is on a distinguished road

      0  

    Question Create a grid with all rows selected at opening

    Create a grid with all rows selected at opening


    I searched through the forum ,but actually i didn't find a solution to this.

    I have a Grid with a certain number of records and a CheckBoxSelectionModel.
    What i want to do is to see all the rows selected after the grid is rendered.


    Actually, this is the code i use but does not do to job.
    Code:
    Grid<ModelData> grid = new Grid<ModelData>(TestData.getStore(), TestData.getColumnModel());
    
    final CheckBoxSelectionModel<ModelData> sm = new CheckBoxSelectionModel<ModelData>();
    sm.setSelectionMode(SelectionMode.SIMPLE);
    
    grid.setSelectionModel(sm);
    grid.selectionModel.selectAll();
    I tried to fire the event Events.HeaderClick after setting the selection model but it doesn't fire at all

    Where is the mistake?


    thanks for the help

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    9
    Vote Rating
    0
    alessalessio is on a distinguished road

      0  

    Default


    Seems that the only way to do this is only when the Grid is attached ..

    Code:
        @Override
        protected void onAttach()    {
            super.onAttach();
            selectionModel.selectAll();
        }
    Here it works.

Similar Threads

  1. Use selected rows in Grid 1 to create Grid 2 in new window
    By papadiddy in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 12 Nov 2009, 8:22 PM
  2. Set all rows in grid to be selected
    By jpartogi in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 4 Nov 2009, 10:16 AM
  3. Grid with rows pre-selected
    By harsha_velicheti in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 3 Nov 2009, 8:31 AM
  4. Getting Selected Rows Data from Grid
    By Manish Roy in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 10 Jun 2008, 3:55 AM
  5. getting selected rows in a grid
    By ericwaldheim in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 9 Oct 2006, 10:58 AM

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi