Filter Grid Panel by Selected Rows

  1. #1

    Filter Grid Panel by Selected Rows

    hi,

    i am working on a grid panel with selection model , but how can i filter the panel on selected rows ?

    thx for help:o
  2. #2
  3. #3
    hi,

    i have found a workaround to set the selected filter with an extra column (avtive) in grid panel heres the code:

    
     <ext:Column Header="Active" DataIndex="Active" Editable="false" Hidden="false" >
    			        <Editor>			             
    			             <ext:TextField ID="TextField411" EnableViewState="true" BlankText="false"  runat="server" />
    			         </Editor>
    </ext:Column>   
    
    =================================================================================
    
    <SelectionModel>                            
                    <ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" ColumnPosition="0" HideCheckAll="false" EnableViewState="true" SingleSelect="false" runat="server" >
                    <DirectEvents>
                     <SelectionChange OnEvent="AddChecked" >                                                   
                          <ExtraParams>
                            <ext:Parameter Name="Values" Value="Ext.encode(#{GridPanel2}.getRowsValues({selectedOnly:true}))"           Mode="Raw" />
                            <ext:Parameter Name="direct" Value="true" Mode="Value"></ext:Parameter>
                          </ExtraParams>   
                        </SelectionChange>    
                    </DirectEvents>                 
                    <Listeners>                                                 
                      <RowSelect Handler="record.set('Active', 'true');" />
                      <RowDeselect Handler="record.set('Active', 'false');"  />
                    </Listeners>
                    </ext:CheckboxSelectionModel>                
                </SelectionModel>  
    
    ===================================================================================
    
    therefore a button function which sets the filter  :
    
    [DirectMethod]
            protected void SetGridFilter(object sender, DirectEventArgs e)
            {           
                Store2.Filter("Projektnummer",this.ComboBox1.SelectedItem.Value.ToString(),true,false);
                this.Label1.Text = this.ComboBox1.SelectedItem.Value.ToString();
    
            }

Similar Threads

  1. Replies: 1
    Last Post: Mar 15, 2012, 7:20 AM
  2. Replies: 1
    Last Post: Dec 29, 2011, 8:19 PM
  3. [CLOSED] [1.0] Hiding filter rows in grid
    By betamax in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 19, 2010, 3:18 PM
  4. Replies: 1
    Last Post: Oct 14, 2010, 12:09 AM
  5. Replies: 0
    Last Post: Sep 01, 2010, 3:35 PM

Posting Permissions