[CLOSED] Add Dynamic Filters to Dynamic Gridpanel

  1. #1

    [CLOSED] Add Dynamic Filters to Dynamic Gridpanel

    Hi guys,

    Fresh back from almost 2 months traveling in Australia, but have to work again :(

    Trying to add gridfilters to a dynamic filter. Created a small example.
    Filters are not appearing....any help appreciated :)

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="FleetWise.Test.Default" %>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Dynamic test</title>
        <form id="form1" runat="server">
         <ext:ResourceManager ID="rmOverzichten" runat="server" CleanResourceUrl="false" />
        <ext:GridPanel runat="server" ID="dgvGrid">
                <ext:Store runat="server" ID="dgvStore">
                        <ext:Model runat="server"/>
        <ext:Button runat="server" Text="Fill grid" OnDirectClick="btn_click"></ext:Button>
    using System;
    using Ext.Net;
    namespace FleetWise.Test
        public partial class Default : System.Web.UI.Page
            protected void btn_click(object sender, DirectEventArgs e)
                dgvStore.AddField(new ModelField("Text", ModelFieldType.String));
                dgvStore.AddField(new ModelField("DateTime", ModelFieldType.Date));
                dgvGrid.ColumnModel.Columns.Add(new Column()
                    DataIndex = "Text",
                    Text = "Text Column"
                dgvGrid.ColumnModel.Columns.Add(new Column()
                    DataIndex = "DateTime",
                    Text = "Date Column"
                // Trying to add filters to grid
                GridFilters gf = new GridFilters();
                StringFilter sf = new StringFilter();
                sf.DataIndex = "Text";
                DateFilter df = new DateFilter();
                df.DataIndex = "DateTime";
                // END
                dgvStore.DataSource = new[]
                                                  Text = "Text1",
                                                  DateTime = DateTime.Now
                                                  Text = "Text2",
                                                  DateTime = DateTime.Now

    Last edited by Daniil; Aug 22, 2014 at 6:24 AM. Reason: [CLOSED]
  2. #2
    Hi Martin,

    I would like to visit Australia ever as well:)

    A GridPanel's .Reconfigure() can reconfigure columns and store, that is it.

    To add filters to a GridFilters plugin on the fly, you are going to rerender a GridPanel at all.
  3. #3
    Great country...friendly people..beautiful nature. Little bit expensive though, but it was worth it.

    Rerender ? Can you eidt this small example to get it working ? :)

    I've tried gridpanel.ReRender() instead of reconfigure, but still no filters..

  4. #4
    Nice. I am packing:)

    I've just replaced
    and that is the only thing I've done. The filters appear for me.

    Could you, please, provide a test case to reproduce?
  5. #5
    mmmm... sorry.. my bad..

    You're right. Works like a charm.

    Thanks !


Similar Threads

  1. Replies: 4
    Last Post: Sep 17, 2013, 12:12 PM
  2. Replies: 0
    Last Post: Jun 17, 2013, 12:05 PM
  3. [CLOSED] Grid Filters Dynamic
    By majunior in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 18, 2011, 4:49 PM
  4. Replies: 0
    Last Post: Mar 04, 2011, 1:05 PM
  5. Dynamic Filters not showing...
    By rthiney in forum 1.x Help
    Replies: 1
    Last Post: Nov 18, 2009, 7:31 PM

Posting Permissions