[CLOSED] Ext.Net GridPanel Filters (The filters are not maintained if they are created by code)

  1. #1

    [CLOSED] Ext.Net GridPanel Filters (The filters are not maintained if they are created by code)

    I have this code:

    Declare the GridFilter and GridFilterCollection:

    GridFilters gridFilters = new GridFilters( ID = GridPanel.ID + "Filters");
    
    GridFilterCollection filterColl = new GridFilterCollection();
    After I add a Filter to the list:

    filterColl.Add(new NumericFilter { DataIndex = ColumnIndexName });
    Then I add the list of filters to the gridFilters:

    gridFilters .Filters.AddRange(filterColl);
    After I use this code

    GridPanel.Reconfigure( GridStore.ClientID, GridPanel.ColumnModel);
     GridPanel.Plugins.Add(gridFilters );
     GridPanel.RegisterColumnPlugins();
     GridPanel.ColumnModel.RegisterCommandStyleRules();
    And when I show the grid in the menu of the column doesn't show the filters option, can you help me with this?
    Attached Thumbnails Click image for larger version. 

Name:	error.png 
Views:	176 
Size:	5.7 KB 
ID:	3695  
    Last edited by Daniil; Jan 16, 2012 at 9:02 AM. Reason: Marked as [CLOSED]. No requested info was provided.
  2. #2
    Hi,

    Yes, Reconfigure() doesn't work with GridFilters.

    Please re-render a whole grid:
    http://forums.ext.net/showthread.php...ll=1#post66424

    I would implement it that way in my real application.
  3. #3
    Hi,

    We can't use Render() because that causes it encyclical code and the grid is not displayed at all.

    In your post you add the columns in the design and configure the store too, meanwhile I do it from code and the result is not the same

    This is the design store configuration, note that we are using a JsonReader

     
    <ext:Store ID="GridStore" runat="server" AutoLoad="true" OnRefreshData="GridStore_OnRefresh">
                <Reader>
                    <ext:JsonReader />
                </Reader>
                <Proxy>
                    <ext:PageProxy />
                </Proxy>
                <AutoLoadParams>
                    <ext:Parameter Name="start" Value="0" Mode="Raw" />
                    <ext:Parameter Name="limit" Value="15" Mode="Raw" />
                </AutoLoadParams>
                    <DirectEventConfig Timeout="900000" />
                <SortInfo  Field="StartedOn" Direction="DESC"/>
            </ext:Store>
    This is the design grid configuration

    <ext:GridPanel ID="GridPanel" runat="server" EnableViewState="false" AutoHeight="true" EnableColumnMove="false" StoreID="GridStore" Layout="Fit">           
                <SelectionModel>
                    <ext:RowSelectionModel />
                </SelectionModel>
                <BottomBar>
                    <ext:PagingToolbar ID="PagingToolbar1" runat="server" DisplayInfo="false" DisplayMsg="Displaying plants {0} - {1} of {2}"
                        PageSize="15" />
                </BottomBar>
                <Listeners>
                    <Command Handler="RowCommand_OnClick(this, { data: record.data, command: command });" />
                </Listeners>
                </Plugins>
            </ext:GridPanel>
  4. #4
    Quote Originally Posted by egdev View Post
    We can't use Render() because that causes it encyclical code and the grid is not displayed at all.
    I'm afraid I can't understand well. Please clarify what did you mean by "that causes it encyclical code"?

    Is the GridPanel within an Ext.NET container with Layout="FitLayout"? It's an important thing in the example I've referred.

    Quote Originally Posted by egdev View Post
    In your post you add the columns in the design and configure the store too, meanwhile I do it from code and the result is not the same
    Please demonstrate how you do that.

    Quote Originally Posted by egdev View Post
    This is the design store configuration, note that we are using a JsonReader
    It doesn't matter in the current problem context what kind of Reader you use for a Store.

    NOTE.

    Marked as closed. No requested info was provided. Please feel free to update the thread with a requested info.
    Last edited by Daniil; Jan 16, 2012 at 9:03 AM.

Similar Threads

  1. [CLOSED] How to clear GridPanel filters on the client?
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Jan 18, 2013, 10:33 AM
  2. [CLOSED] Loop through filters Gridpanel
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Apr 27, 2012, 11:42 AM
  3. Replies: 22
    Last Post: Jan 25, 2012, 8:46 PM
  4. Filters for DataView?
    By shaun in forum 1.x Help
    Replies: 10
    Last Post: Jul 24, 2009, 5:05 PM
  5. Grid filters in code-behind
    By petlun in forum 1.x Help
    Replies: 4
    Last Post: Jan 01, 2009, 2:40 PM

Tags for this Thread

Posting Permissions