GridPanel SelModel

  1. #1

    GridPanel SelModel

    Quick question,

    On PostBack how would I get the selected items from the GridPanel with the following example:

                                    <ExtJS:Store ID="Categories"
                                        runat="server"
                                        AutoLoad="True">
                                        <Reader>
                                            <ExtJS:JsonReader ReaderID="CategoryId">
                                                <Fields>
                                                    <ExtJS:RecordField Name="CategoryId" />
                                                    <ExtJS:RecordField Name="Translation" />
                                                </Fields>
                                            </ExtJS:JsonReader>
                                        </Reader>
                                    </ExtJS:Store>
                                    <ExtJS:GridPanel ID="dgCategories"
                                        runat="server"
                                        StoreID="Categories"
                                        AutoExpandColumn="Translation"
                                        AutoHeight="True"
                                        StripeRows="True"
                                        TrackMouseOver="True"
                                        Width="325">
                                        <ColumnModel>
                                            <Columns>
                                                <ExtJS:Column ColumnID="Translation" DataIndex="Translation" Header="Category" MenuDisabled="True" />
                                            </Columns>
                                        </ColumnModel>
                                        <SelModel>
                                            <ExtJS:CheckboxSelectionModel ID="CategorySelection" runat="server" />
                                        </SelModel>
                                    </ExtJS:GridPanel>
    Cheers,
    Timothy
  2. #2

    RE: GridPanel SelModel

    Hi Timothy,

    There is a problem with this feature. We're fixing and will post a code sample demonstrating how to use.


    Geoffrey McGill
    Founder
  3. #3

    RE: GridPanel SelModel

    Great thanks Geoffrey!

    Would be awesome if from AjaxEvents (or regular postback) if I could get and set the selected items :)

    Cheers,
    Timothy
  4. #4

    RE: GridPanel SelModel

    Yes, this will be easily possible. The missing feature was just an oversight on our part.*

    An update will be available shortly.


    Geoffrey McGill
    Founder
  5. #5

    RE: GridPanel SelModel

    Thanks any update on this one? I've got a GridPanel waiting for some functionality :)

    Cheers,
    Timothy
  6. #6

    RE: GridPanel SelModel

    Hi Timothy,

    Sorry, not ready yet, we working on it and will commit soon
  7. #7

    RE: GridPanel SelModel



    Hi Timothy,

    We're close to finishing up the new functionality for getting the selected rows. The functionality will return a <List> filled with property values that from the "ReaderID" property as defined in the <ext:Store>. We'll have some code demonstrating this functionality available shortly which should clarify everything.

    On a related note, the <SelModel> property on the <ext:GridPanel> has been renamed to <SelectionModel>.

    Example

    // Old
    <ext:GridPanel 
        ID="GridPanel1" 
        runat="server" 
        StoreID="Store1"
        Title="Company List"
        Width="600"
        Height="350">
        <SelModel>
            <ext:CheckboxSelectionModel runat="server" />
        </SelModel>
    </ext:GridPanel>
    
    
    // New
    <ext:GridPanel 
        ID="GridPanel1" 
        runat="server" 
        StoreID="Store1"
        Title="Company List"
        Width="600"
        Height="350">
        <SelectionModel>
            <ext:CheckboxSelectionModel runat="server" />
        </SelectionModel>
    </ext:GridPanel>
    On another somewhat related note, we have also renamed the <Bbar> property to <BottomBar>.

    Example

    // Old
    <Bbar>
        <ext:PagingToolBar ID="PagingToolBar1" runat="server" />
    </Bbar>
    
    
    // New
    <BottomBar>
        <ext:PagingToolBar ID="PagingToolBar1" runat="server" />
    </BottomBar>
    Geoffrey McGill
    Founder
  8. #8

    RE: GridPanel SelModel

    Great Geoffrey,

    I think getting back a List of ReaderID values is a great solution. How will you handle setting the selection; same way?

    Looking forward to the example.

    Cheers,
    Timothy
  9. #9

    RE: GridPanel SelModel

    Any ETA on its completion? I know you said close, wouldn't mind give it a smack around :)

    Cheers,
    Timothy
  10. #10

    RE: GridPanel SelModel

    What's in SVN so far is great guys; thanks so much :)

    Cheers,
    Timothy

Similar Threads

  1. this.selModel.selectedData is null
    By hihill in forum 1.x Help
    Replies: 0
    Last Post: Jun 25, 2012, 12:32 PM
  2. [FIXED] [V0.6] GridPanel and SelModel
    By Timothy in forum Bugs
    Replies: 3
    Last Post: Sep 02, 2008, 1:48 PM

Posting Permissions