[CLOSED] ListFilter with a StoreID

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] ListFilter with a StoreID

    Can you refer me to a sample of how a StoreID would be used on a ListFilter?

    Thanks.
    -Steve
    Last edited by geoffrey.mcgill; Aug 27, 2010 at 6:20 PM. Reason: [CLOSED]
  2. #2
    Hello!

    Before testing please update from the SVN repository.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.Store1;
                store.DataSource = new object[] { 
                                             new object[] {"test1"},
                                             new object[] {"test2"},
                                             new object[] {"test3"}
                                    };
                store.DataBind();
            }
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Store ID="Store1" runat="server">
            <Reader>
                <ext:ArrayReader>
                    <Fields>
                        <ext:RecordField Name="test" />
                    </Fields>
                </ext:ArrayReader>
            </Reader>
        </ext:Store>
        <ext:GridPanel runat="server" StoreID="Store1" AutoHeight="true">
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Header="Test" DataIndex="test" />
                </Columns>
            </ColumnModel>
            <Plugins>
                <ext:GridFilters>
                    <Filters>
                        <ext:ListFilter DataIndex="test" StoreID="Store1" LabelField="test" />
                    </Filters>
                </ext:GridFilters>
            </Plugins>
        </ext:GridPanel>
        </form> 
    </body>
    </html>
  3. #3

    ListFilter with a StoreID

    Excellant. Is it the DataIndex or the LabelField that ties the listfilter options to the store record field?

    -Steve
  4. #4
    DataIndex is specified for the field that would be filtered (DataIndex of RecordField of GridPanel's Store).
    FieldLabel is specified for retrieving items for filter's menu.
    Last edited by Daniil; Aug 27, 2010 at 6:27 PM.
  5. #5
    That is exactly the information that I needed. Thank you.

    -Steve
  6. #6
    Hmm, this thread seems to be exactly what I'm looking for (dynamically load the filter items from a store), but somehow it doesn't like the "Store" and "LabelField" attributes (I'll get a parser error when trying to use them)... what am I missing?
  7. #7
    Hi wexman,

    It's difficult to say anything without a sample code.

    Could you provide a simplified code reproducing the issue?
  8. #8
    Hi Daniil,

    here's the code I'm using (shortened...)

    <ext:Store ID="Store1" runat="server" OnSubmitData="Store1_Submit" AutoLoad="false">
        <!-- SomeProxyHere -->
        <Reader>
            <ext:JsonReader Root="d">
                <Fields>
                    <ext:RecordField Name="ContextId" Type="String" />
                    <ext:RecordField Name="EventId" Type="Int" />
                    <ext:RecordField Name="EventTypeName" Type="String" />
                    <ext:RecordField Name="PropertyId" Type="Int" />
                    <ext:RecordField Name="PropertyName" Type="String" />
                    <ext:RecordField Name="Value" Type="Auto" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:store>
    <ext:GridPanel ID="GridPanel1" runat="server" Title="Objektbewegungen" StoreID="Store1">
        <Plugins>
            <ext:GridFilters runat="server" ID="GridFilters1" Local="true">
                <Filters>
                    <ext:ListFilter DataIndex="PropertyName" StoreID="Store1" LabelField="PropertyName" />
                </Filters>
            </ext:GridFilters>
        </Plugins>
        <ColumnModel ID="ColumnModel1" runat="server">
            <Columns>
                <ext:Column Header="Eigenschaft" DataIndex="PropertyName" Align="Left" Hideable="true">
                </ext:Column>
                <!-- More Columns here... -->
            </Columns>
        </ColumnModel>
    </ext:GridPanel>
    What I was trying to achieve is having a listfilter with an item for every distinct PropertyName. Instead I'm getting a parser error: "Der Typ Ext.Net.ListFilter hat keine öffentliche Eigenschaft mit dem Namen StoreID." (sorry, German version, this probably translates to "The type Ext.Net.ListFilter has no public Property with the name StoreID.")

    Guess I'm on the wrong version (1.0ß) and need to "download from SVN"?!? If so, how do I?
  9. #9
    Quote Originally Posted by wexman View Post
    Hi Daniil,

    Guess I'm on the wrong version (1.0ß) and need to "download from SVN"?!? If so, how do I?
    That's right the fix with ListFilter has been committed to the SVN in processing of work on this thread.

    To get an access to the SVN needs to purchase the license
    http://ext.net/store/

    Or you could wait the next community release of Ext.Net that happens soon.
  10. #10
    Hi Daniil,

    thanks for your reply! I think we're going to purchase a license anyway, but currently we're still in the evaluation phase. Can you tell how soon the new release will be available?

    Until then, I think I should be able to create the filter list by code, but I'm having problems with that. I know how to set the filter options by code, but I cannot get the menu to reflect the changes that I make. Is this possible? And if so, how?

    Thanks!
    Jens
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Setting StoreID on GridFilter to IFrame location
    By peter.campbell in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 27, 2012, 1:39 PM
  2. [CLOSED] ListFilter problem
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 12, 2012, 12:51 PM
  3. [CLOSED] How to Initialize a ListFilter with Value(s) ?
    By IT1333 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 01, 2011, 8:35 PM
  4. Comboboxes with same StoreID problem
    By vostro1700 in forum 1.x Help
    Replies: 2
    Last Post: Jul 31, 2009, 3:56 PM
  5. problem with multiple dropdownlists using the same storeid
    By LeeTheGreek in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 22, 2009, 7:34 AM

Tags for this Thread

Posting Permissions