[CLOSED] CheckboxSelectionModel Checkall as Standard

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] CheckboxSelectionModel Checkall as Standard

    Hello,

    ís it possible to set somewhere all Checkboxes in a Grid via CheckboxSelectionModel as Standard-Value?


    Regards,

    Martin
  2. #2

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Hi,

    You can use the following listener for GridPanel
    <Render Handler="this.getSelectionModel().selectAll();" Delay="100" />
  3. #3

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Hi Vlad,

    thanks a lot for your fast answer, but this does not work for me.

    This is my current code:

                    <ext:GridPanel ID="GridPanelBookingOverview" runat="server" Title="Overview"
                        AutoExpandColumn="DateId" StoreID="BookingListStore" Icon="StatusOnline" Frame="true"
                        MonitorWindowResize="true" MonitorResize="true">
                        <ColumnModel ID="ColumnModelBookingOverview" runat="server">
                            <Columns>
                              //...
                            </Columns>
                        </ColumnModel>
                        <SelectionModel>
                            <ext:CheckboxSelectionModel />
                        </SelectionModel>
                        <Listeners>
                        <Render Handler="this.getSelectionModel().selectAll();" Delay="100" /> 
                        </Listeners>
                        <LoadMask ShowMask="true" />
                        <TopBar>
        <ext:Toolbar runat="server">
                                <Items>
                                    <ext:ComboBox ID="ReportSelection" runat="server" Width="300" EmptyText="Select Report...">
                                        <Items>
                                      //...
                                        </Items>
                                    </ext:ComboBox>
                                    <ext:ToolbarButton ID="PDFDownload" Text="Download PDF" Icon="PageWhiteAcrobat"
                                        runat="server">
                                        <AjaxEvents>
                                            <Click OnEvent="ExportReport_Click" IsUpload="true">
                                                <%--      <EventMask ShowMask="true" />--%>
                                            </Click>
                                        </AjaxEvents>
                                    </ext:ToolbarButton>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                    </ext:GridPanel>
  4. #4

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Ahhh ok. It works with Delay="500" :-)


    Just another little question...


    The "SelectAll" Checkbox is not selected (see Screenshot).
    Is there a way to reach that too?

    Because now I have to select the SelectAll-Checkbox 2 times if I want to deselect all.


    Regards,

    Martin
  5. #5

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Hi,

    Yes, I think it is a bug that 'Check All' is not selected. We are working on it. The fix should be commit today.


    P.S. I think need move 'selectAll' calling from grid's Render to the store's Load because selection must be performed after data loading
    <Load Handler="#{GridPanel1}.getSelectionModel().selectAll();" Single="true" Delay="100" />

    or you can try Refresh listener of GridView (fires after data binding and data showing)




  6. #6

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Thank you!

    The load handler works fine and fast as Store-Listener.


    Can you leave here a note if the bug is fixed?
    Maybe also with a comment where you fixed what?

    I did not change from 0.7 to 0.8.1 until now, because I have problems with preselected Remote ComboBoxes
    with the upgrade and do not have the time at the moment to look at it.
    So I have to add your bugfix to my 0.7 version of Coolite.


    Regards,

    Martin
  7. #7

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Hi,

    If you can't update from SVN I can get simple workaround: just add after 'selectAll()' the following code
    #{GridPanel1}.getSelectionModel().checkHeader();
  8. #8

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Perfect! Thank you!


  9. #9

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Hi Vladsch,

    I have to come back to this Thread.

    As I wrote, it worked fine with:

        <Listeners>
        <Load Handler="#{GridPanelBookingOverview}.getSelectionModel().selectAll();#{GridPanelBookingOverview}.getSelectionModel().checkHeader();" Single="true" Delay="100" />
        </Listeners>
    in my Store.

    But this solution has a little problem.
    When I refresh the grid/store, then the old selections stay, but I want that all rows are selected again.

    You wrote:

    or you can try Refresh listener of GridView (fires after data binding and data showing)
    I think that´s why I need. But I cannot find a refresh Listener in my ext:GridPanel.
    Can you give me a short example?


    I am using Coolite 0.8.2 (SVN Build of yesterday morning CET) now.



    Regards,

    Martin


  10. #10

    RE: [CLOSED] CheckboxSelectionModel Checkall as Standard

    Hi,

    1. You have old selection after refresh because Single="true" for Load Listener. Try to remove Single
    2. Refresh listener you can find in GridView's listeners
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Which accessibility standard supported by Ext.Net
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 11, 2012, 5:11 PM
  2. Checkboxselectionmodel and checkall
    By Birgit in forum 1.x Help
    Replies: 3
    Last Post: May 20, 2011, 3:04 PM
  3. Replies: 1
    Last Post: Mar 26, 2011, 5:43 PM
  4. [CLOSED] Mulitple textbox in Standard prompt dialog
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 25, 2010, 10:12 AM
  5. [CLOSED] Emulating a standard DropDownList
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Dec 05, 2009, 7:53 PM

Posting Permissions