Clear selections of gridpanel

  1. #1

    Clear selections of gridpanel



    Hi. For clearing selection of a gridpanel from code-behind we used to use the code below.

    GridPanel1.AddScript("{0}.getSelectionModel().clea rSelections();", GridPanel1.ClientID);

    Any changes in v8.0?

    Thanks
  2. #2

    RE: Clear selections of gridpanel

    Any changes in v8.0?
    No, but I've just gone through the SelectionModel classes and added the methods, including .ClearSelections().


    In the next release you'll be able to do the following.


    Example


    this.SelectionModel1.ClearSelections();

    I don't have a date for the next public release of the toolkit, but we're hoping to publish a quick 0.8.1 maintenance release.


    Geoffrey McGill
    Founder
  3. #3

    RE: Clear selections of gridpanel

    You could also reference an instance of the SelectionModel via the GridPanel object.

    Example


    (this.GridPanel1.SelectionModel[0] as RowSelectionModel).ClearSelections();

    Hope this helps.


    Geoffrey McGill
    Founder
  4. #4

    RE: Clear selections of gridpanel

    Hi,

    How to clear selected rows of a grid on client side?
  5. #5

    RE: Clear selections of gridpanel

    I have an ext:Window with 2 buttons on it for OK (insert minimum qualification into the textbox) and Cancel... this should help you remove selections on the client side, specifically the part #{GridPanel1}.clear();

    
    
    <Buttons>
    
    
    <ext:Button runat="server" ID="btnInsertMinQual" Text="OK" Icon="Accept">
    
    
    <AjaxEvents>
    
    
    <Click OnEvent="btnInsertMinQual_Click" />
    
    
    </AjaxEvents>
    
    
    </ext:Button> 
    
    
    <ext:Button runat="server" ID="btnCancel" Text="Cancel" Icon="Cancel" OnClientClick="#{cbMinQualFacultyList}.clearValue();#{cbMinQualDepartmentList}.clearValue();#{grdMinQual}.clear();#{stoMinQualDepartmentList}.reload();winCreateNewMinQual.hide();return false;" />
    
    
    </Buttons>

Similar Threads

  1. Clear selections in checkbox selection model
    By Birgit in forum 2.x Help
    Replies: 0
    Last Post: May 29, 2012, 12:28 PM
  2. Replies: 3
    Last Post: Feb 16, 2012, 4:26 PM
  3. [CLOSED] Clear RowSelection in GridPanel
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 16, 2010, 11:57 PM
  4. clear Grouping in gridpanel
    By maxdiable in forum 1.x Help
    Replies: 0
    Last Post: Jan 24, 2010, 6:28 AM
  5. [CLOSED] GridPanel ComboBox Clear Value
    By bethc in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 25, 2009, 4:49 AM

Posting Permissions