Results 1 to 2 of 2

Thread: Select All Rows from a grid

  1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    168

    Default Select All Rows from a grid

    I have a function for a button on a master/detail form that when pressed will update all detail records.

    Right now it works if you select all the records in the grid by clicking on the record.

    I want to automatically select all records when I press the button instead of having to select them manually.

    Code:
        ,onConvert : function() {
            var detailGrid = this.getComponent('tallyGrid');
            var records = detailGrid.getSelected();     <----  I WANT TO REPLACE THIS WITH A METHOD TO SELECT ALL AUTOMATICALLY
            if (records) {
                this.fireEvent('convertStock', records, detailGrid, this);
            }
        }
    I tried detailGrid.selectAll(); but that is not valid

    Thanks in advance for any insight

  2. #2
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default

    grid.getSelectionModel().selectAll()

    You should use the documentation.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

Similar Threads

  1. how to select some rows in grid by default?
    By madhu_g in forum Ext GWT: Help & Discussion (1.x)
    Replies: 1
    Last Post: 27 Aug 2009, 8:33 AM
  2. Select all rows in grid
    By Bandorka in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Jan 2009, 9:42 AM
  3. Select rows by name in a grid
    By Tobsen in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 19 Mar 2008, 8:30 AM

Posting Permissions

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