[CLOSED] Get selected rows in GridPanel

  1. #1

    [CLOSED] Get selected rows in GridPanel

    I have a GridPanel which supports multiple row selections using a CheckboxSelectionModel. I have an event that fires upon the GridPanel's SelectionChange, which works fine.

    However, when this event fires, I want to be able to submit the IDs of the selected rows back to the server - how do I go about doing this?

    I know you can use "getRowsValues" to get all the row values from the grid, but is there a way to just get the selected row's IDs?

    ...
    <SelectionModel>
            <ext:CheckboxSelectionModel>
                <AjaxEvents>
                    <SelectionChange OnEvent="grdProjects_SelectionChange" Buffer="250">
                        <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{grdRisks}" />
                        <ExtraParams>
                            <ext:Parameter Name="SelectedRows" Value="Ext.encode(#{grdProjects}.getRowsValues(false))" Mode="Raw" />
                        </ExtraParams>                                                                            
                    </SelectionChange>
                </AjaxEvents>
            </ext:CheckboxSelectionModel>
        </SelectionModel>
    </ext:GridPanel>
  2. #2

    RE: [CLOSED] Get selected rows in GridPanel

    Hi,

    ID's of selected rows is submitted automatically and available through SelectedRow collection of SelectionModel
    Please see the following sample


    https://examples1.ext.net/#/GridPane...Row_Selection/
    *

  3. #3

    RE: [CLOSED] Get selected rows in GridPanel

    Thanks very much, works great!

Similar Threads

  1. [CLOSED] Checkbox Selected Rows in GridPanel
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 12, 2012, 1:00 PM
  2. [CLOSED] How to get selected rows count in gridpanel
    By egvt in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 31, 2012, 5:22 PM
  3. Replies: 1
    Last Post: Oct 13, 2010, 11:09 PM
  4. [CLOSED] How to set all rows as selected in GridPanel
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 30, 2010, 4:42 PM
  5. Replies: 2
    Last Post: Dec 25, 2009, 2:56 PM

Posting Permissions