[CLOSED] GridFilters issue in Treepanel

  1. #1

    [CLOSED] GridFilters issue in Treepanel

    Hi,
    if I add to Treepanel the GridFilters feature I get a javascritpt error.


    Below your example http://examples2.ext.net/#/TreePanel/Advanced/TreeGrid/
    with GridFilters.


    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head id="Head1" runat="server">
        <title>TreeGrid - Ext.NET Examples</title>
        
        <link href="/resources/css/examples.css" rel="stylesheet" />
        
        <script>
            var formatHours = function (v) {
                if (v < 1) {
                    return Math.round(v * 60) + " mins";
                } else if (Math.floor(v) !== v) {
                    var min = v - Math.floor(v);
                    return Math.floor(v) + "h " + Math.round(min * 60) + "m";
                } else {
                    return v + " hour" + (v === 1 ? "" : "s");
                }
            };
    
            var handler = function (grid, rowIndex, colIndex, actionItem, event, record, row) {
                Ext.Msg.alert('Editing' + (record.get('done') ? ' completed task' : ''), record.get('task'));
            };
        </script>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            
            <h1>
                TreeGrid Example
            </h1>
            <br />
    
            <ext:TreePanel ID="TreePanel1" 
                runat="server"
                Title="Core Team Projects"
                Width="500"
                Height="300"
                Collapsible="true"
                UseArrows="true"
                RootVisible="false"
                MultiSelect="true"
                SingleExpand="true"
                FolderSort="true">
                <Fields>
                    <ext:ModelField Name="task" />
                    <ext:ModelField Name="user" />
                    <ext:ModelField Name="duration" />
                    <ext:ModelField Name="done" Type="Boolean" />
                </Fields>
                <ColumnModel>
                    <Columns>
                        <ext:TreeColumn ID="TreeColumn1" 
                            runat="server"
                            Text="Task" 
                            Flex="2" 
                            Sortable="true"
                            DataIndex="task" />
                        <ext:TemplateColumn ID="TemplateColumn1" 
                            runat="server"
                            Text="Duration" 
                            Flex="1"
                            Sortable="true" 
                            DataIndex="duration" 
                            Align="Center">                        
                            <Template ID="Template1" runat="server">
                                <Html>
                                    {duration:this.formatHours}
                                </Html>
                                <Functions>
                                    <ext:JFunction Name="formatHours" Fn="formatHours" />
                                </Functions>
                            </Template>
                        </ext:TemplateColumn>
                        <ext:Column ID="Column1" 
                            runat="server"
                            Text="Assigned To" 
                            Flex="1" 
                            Sortable="true"
                            DataIndex="user" />
                        <ext:CheckColumn ID="CheckColumn1" runat="server" 
                           Text="Done"
                           DataIndex="done"
                           Width="40"
                           Editable="true"
                           StopSelection="false" />
                        <ext:ActionColumn ID="ActionColumn1" runat="server" 
                            Text="Edit"
                            Width="40"
                            MenuDisabled="true"
                            Align="Center">
                            <Items>
                                <ext:ActionItem Tooltip="Edit task" Icon="PageWhiteEdit" Handler="handler">
                                    <IsDisabled Handler="return !record.data.leaf;" />
                                </ext:ActionItem>
                            </Items>    
                        </ext:ActionColumn>
                    </Columns>    
    
                </ColumnModel>
                
                <Root>
                    <ext:Node Text="Tasks">
                        <Children>
                            <ext:Node Icon="Folder" Expanded="true">
                                <CustomAttributes>
                                    <ext:ConfigItem Name="task" Value="Project: Shopping" Mode="Value" />
                                    <ext:ConfigItem Name="duration" Value="13.25" />
                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                </CustomAttributes>
                                <Children>
                                    <ext:Node Icon="Folder">
                                        <CustomAttributes>
                                            <ext:ConfigItem Name="task" Value="Housewares" Mode="Value" />
                                            <ext:ConfigItem Name="duration" Value="1.25" />
                                            <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                        </CustomAttributes>
                                        <Children>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Kitchen supplies" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Groceries" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.4" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                    <ext:ConfigItem Name="done" Value="true" Mode="Raw" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Cleaning supplies" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.4" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Office supplies" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.2" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                        </Children>
                                    </ext:Node>
                                    <ext:Node Icon="Folder" Expanded="true">
                                        <CustomAttributes>
                                            <ext:ConfigItem Name="task" Value="Remodeling" Mode="Value" />
                                            <ext:ConfigItem Name="duration" Value="12" />
                                            <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                        </CustomAttributes>
                                        <Children>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Retile kitchen" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="6.5" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Icon="Folder">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Paint bedroom" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="2.75" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                                <Children>
                                                    <ext:Node Leaf="true">
                                                        <CustomAttributes>
                                                            <ext:ConfigItem Name="task" Value="Ceiling" Mode="Value" />
                                                            <ext:ConfigItem Name="duration" Value="1.25" />
                                                            <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                        </CustomAttributes>
                                                    </ext:Node>
                                                    <ext:Node Leaf="true">
                                                        <CustomAttributes>
                                                            <ext:ConfigItem Name="task" Value="Walls" Mode="Value" />
                                                            <ext:ConfigItem Name="duration" Value="1.5" />
                                                            <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                        </CustomAttributes>
                                                    </ext:Node>
                                                </Children>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Decorate living room" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="2.75" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                    <ext:ConfigItem Name="done" Value="true" Mode="Raw" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Fix lights" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.75" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                    <ext:ConfigItem Name="done" Value="true" Mode="Raw" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Reattach screen door" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="2" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                        </Children>
                                    </ext:Node>
                                </Children>
                            </ext:Node>
                            <ext:Node Icon="Folder">
                                <CustomAttributes>
                                    <ext:ConfigItem Name="task" Value="Project: Testing" Mode="Value" />
                                    <ext:ConfigItem Name="duration" Value="2" />
                                    <ext:ConfigItem Name="user" Value="Core Team" Mode="Value" />
                                </CustomAttributes>
                                <Children>
                                    <ext:Node Icon="Folder">
                                        <CustomAttributes>
                                            <ext:ConfigItem Name="task" Value="Mac OSX" Mode="Value" />
                                            <ext:ConfigItem Name="duration" Value="0.75" />
                                            <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                        </CustomAttributes>
                                        <Children>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="FireFox" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Safari" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Chrome" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Clark Lewis" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                        </Children>
                                    </ext:Node>
                                    <ext:Node Icon="Folder">
                                        <CustomAttributes>
                                            <ext:ConfigItem Name="task" Value="Windows" Mode="Value" />
                                            <ext:ConfigItem Name="duration" Value="3.75" />
                                            <ext:ConfigItem Name="user" Value="Darrell Meyer" Mode="Value" />
                                        </CustomAttributes>
                                        <Children>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="FireFox" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Darrell Meyer" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Safari" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Darrell Meyer" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Chrome" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Darrell Meyer" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Internet Explorer" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="3" />
                                                    <ext:ConfigItem Name="user" Value="Darrell Meyer" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                        </Children>
                                    </ext:Node>
                                    <ext:Node Icon="Folder">
                                        <CustomAttributes>
                                            <ext:ConfigItem Name="task" Value="Linux" Mode="Value" />
                                            <ext:ConfigItem Name="duration" Value="0.5" />
                                            <ext:ConfigItem Name="user" Value="Steve Scott" Mode="Value" />
                                        </CustomAttributes>
                                        <Children>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="FireFox" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Steve Scott" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                            <ext:Node Leaf="true">
                                                <CustomAttributes>
                                                    <ext:ConfigItem Name="task" Value="Chrome" Mode="Value" />
                                                    <ext:ConfigItem Name="duration" Value="0.25" />
                                                    <ext:ConfigItem Name="user" Value="Steve Scott" Mode="Value" />
                                                </CustomAttributes>
                                            </ext:Node>
                                        </Children>
                                    </ext:Node>
                                </Children>
                            </ext:Node>
                        </Children>
                    </ext:Node>
                </Root>
    
                 <Features>
                    <ext:GridFilters runat="server" ID="GridFilters4" Local="true">
                        <Filters>
                            <ext:StringFilter DataIndex="user" />
                        </Filters>
                    </ext:GridFilters>
                </Features>
    
    
            </ext:TreePanel>        
        </form>
    </body>
    </html>

    Any idea?
    Last edited by fabricio.murta; Oct 29, 2016 at 11:05 PM. Reason: no user feedback for 7+ days
  2. #2
    Hello @ADV!

    This answer from Vladimir is still actual: TreeGrid Filters - Plugins - Post 2.

    In short, the GridFilters plugin is written for GridPanels and is not supposed to work on TreePanels at all.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello @ADV!

    It has been more than a week and no feedback on this thread. Do you still need assistance on this issue? If still no reply for another week, we'll mark this as closed -- which won't prevent you from posting follow-ups afterwards anyway.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] GUI Issue in treepanel
    By aditya in forum 2.x Premium Help
    Replies: 3
    Last Post: Nov 14, 2014, 9:25 AM
  2. TreePanel GridFilters (Features not found)
    By millenovanta in forum 2.x Help
    Replies: 1
    Last Post: Sep 15, 2013, 5:07 PM
  3. [CLOSED] TreePanel Issue
    By sailendra in forum 2.x Premium Help
    Replies: 1
    Last Post: Aug 03, 2012, 11:58 AM
  4. Treepanel webservice issue
    By anulall in forum 1.x Help
    Replies: 0
    Last Post: Jun 20, 2011, 7:14 AM
  5. [1.0] TreePanel - PageTreeLoader issue
    By pbsoft in forum 1.x Help
    Replies: 1
    Last Post: Aug 04, 2010, 6:26 PM

Posting Permissions