[CLOSED] ListFilter scroll bar?

  1. #1

    [CLOSED] ListFilter scroll bar?

    Hi,

    My ListFilter contains a couple of dozens options and may potentially drop down to the basement of the screen. I'm wondering if there's a way to limit its height to a number of entries making a vertical scrollbar appear if necessary. Please advise.
    Last edited by Daniil; Jul 05, 2012 at 8:46 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I can suggest the following solution.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!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>
    
        <script type="text/javascript">
            var setMenuHeight = function (grid, dataIndex, height) {
                grid.filters.filters.each(function (f) {
                    if (f.dataIndex ===  dataIndex) {
                        f.menu.enableScrolling = true;
                        f.menu.maxHeight = 100;
                        return false;
                    }
                });
            };
        </script>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
            <Store>
                <ext:Store runat="server">
                    <Reader>
                        <ext:ArrayReader>
                            <Fields>
                                <ext:RecordField Name="test" />
                            </Fields>
                        </ext:ArrayReader>
                    </Reader>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Header="Test" DataIndex="test" />
                </Columns>
            </ColumnModel>
            <Plugins>
                <ext:GridFilters runat="server">
                    <Filters>
                        <ext:ListFilter 
                            DataIndex="test" 
                            Options="test1,test2,test3,test4,test5,test6,test7" />
                    </Filters>
                </ext:GridFilters>
            </Plugins>
            <Listeners>
                <BeforeRender Handler="setMenuHeight(this, 'test', 50);" />
            </Listeners>
        </ext:GridPanel>
    </body>
    </html>
  3. #3
    Thanks Daniil!

    This solution meets my requirements. Please mark this thread as closed.

Similar Threads

  1. [CLOSED] Scrolling ListFilter
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 05, 2012, 6:07 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] ListFilter values
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 23, 2012, 3:41 PM
  4. [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
  5. [CLOSED] ListFilter with a StoreID
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Oct 08, 2010, 1:51 PM

Tags for this Thread

Posting Permissions