This is a migrated thread and some comments may be shown as answers.

RadGrid SelfHierarchy - Filters acting "weird"

3 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tomaž Lovrec
Top achievements
Rank 1
Tomaž Lovrec asked on 06 Jul 2010, 09:59 AM
Hello,

I have followed this example to build a SelfHierarchy RadGrid:
http://www.telerik.com/help/aspnet/grid/grdselfreferencinghierarchy.html
and it went well, except for the filters.

What's happening is that when I add a filter condition it displays the root item and the child items as it should and then again child items as if they were root items.

Here is the aspx code of the grid:
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlTask" OnColumnCreated="RadGrid1_ColumnCreated" 
        OnItemCreated="RadGrid1_ItemCreated" OnInsertCommand="taskInsertCommand" OnItemCommand="RadGrid1_ItemCommand" 
        OnUpdateCommand="taskUpdateCommand" OnDeleteCommand="taskDeleteCommand" 
        OnItemDataBound="RadGrid1_ItemDataBound" GridLines="None" Skin="Sunset" Width="100%"
        <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="ServerBind" AllowSorting="true" AllowFilteringByColumn="true" 
            DataKeyNames="id, deadline, percent_complete, id_prioritete" Width="100%" AutoGenerateColumns="False"  
            DataSourceID="SqlTask" GridLines="None" AllowPaging="False" EditMode="PopUp"
            <SelfHierarchySettings ParentKeyName="id_parent" KeyName="id" /> 
            <Columns> 
                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Preview" Text="Predogled" ImageUrl="~/members/images/magnifier.png" UniqueName="Preview"
                   <HeaderStyle Width="25px" />                  
                </telerik:GridButtonColumn>             
                <telerik:GridEditCommandColumn ButtonType="ImageButton" CancelText="Preklici"  
                    InsertText="Dodaj" UpdateText="Shrani"
                    <HeaderStyle Width="32px" /> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                   ConfirmDialogType="RadWindow" ConfirmText="Ali si preprican da želiš izbrisati vnos?" 
                   Text="Briši" UniqueName="column"
                   <HeaderStyle Width="32px" /> 
                </telerik:GridButtonColumn> 
                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="StartTask" Text="Začni z nalogo" 
                    UniqueName="StartTask" ImageUrl="~/members/images/calendar.gif"
                    <HeaderStyle Width="25px" /> 
                </telerik:GridButtonColumn> 
                <telerik:GridBoundColumn HeaderText="P" ReadOnly="true" UniqueName="priority" AllowFiltering="false" HeaderStyle-Width="25px" DataField="priority"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn HeaderText="P" ReadOnly="true" UniqueName="id_prioritete" 
                    AllowFiltering="false" HeaderStyle-Width="25px" DataField="id_prioritete" Visible="false"
                </telerik:GridBoundColumn> 
                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="EndTask" Text="Končaj nalogo" 
                    UniqueName="EndTask" ImageUrl="~/members/images/cancel.gif"
                    <HeaderStyle Width="25px" /> 
                </telerik:GridButtonColumn> 
                <telerik:GridBoundColumn DataField="id" DataType="System.Int32" HeaderText="ID"  
                    ReadOnly="True" SortExpression="id" UniqueName="id" Visible="false"
                    <HeaderStyle Width="200px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="title" DataType="System.String"  
                    HeaderText="NASLOV" SortExpression="title"  
                    UniqueName="title" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="start_date" DataType="System.DateTime" 
                    HeaderText="DATUM ZAČETKA" SortExpression="start_date" UniqueName="start_date" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="task_creator" DataType="System.Guid"  
                    HeaderText="USTVARJALEC" SortExpression="task_creator"  
                    UniqueName="task_creator" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="task_assigned" DataType="System.Guid"  
                    HeaderText="IZVAJALEC" SortExpression="task_assigned"  
                    UniqueName="task_assigned" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="deadline" DataType="System.DateTime" 
                    HeaderText="ROK" SortExpression="deadline" UniqueName="deadline" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="percent_complete" DataType="System.Int32"  
                    HeaderText="KONČANO V %" SortExpression="percent_complete"  
                    UniqueName="percent_complete" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="end_date" DataType="System.DateTime" 
                    HeaderText="DATUM KONCA" SortExpression="end_date" UniqueName="end_date" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="predecessors" HeaderText="PREDHODNIKI"  
                    SortExpression="predecessors" UniqueName="predecessors" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="id_parent" DataType="System.Int32"  
                    HeaderText="id_parent" SortExpression="id_parent" UniqueName="id_parent" Visible="false" HeaderStyle-Width="150px"
                </telerik:GridBoundColumn>            
            </Columns> 
            <EditFormSettings CaptionFormatString="UREJANJE NALOG" UserControlName="user_controls/insertTask.ascx"  
                EditFormType="WebUserControl" PopUpSettings-Width="600"
                <EditColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1"
                </EditColumn> 
                <PopUpSettings ScrollBars="None"></PopUpSettings> 
            </EditFormSettings> 
        </MasterTableView> 
        <ClientSettings AllowExpandCollapse="true" /> 
    </telerik:RadGrid> 


Best regards,
Tomaž Lovrec


3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 09 Jul 2010, 02:44 PM
Hello Tomaž,

Unfortunately this is not supported scenario. The self-referencing hierarchy doesn't work with filtering.

Please excuse us for any inconvenience caused by this limitation

Kind regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mallik
Top achievements
Rank 1
answered on 28 Jul 2010, 02:59 PM
hi,
did you got solution for this issue?
0
Tomaž Lovrec
Top achievements
Rank 1
answered on 28 Jul 2010, 04:01 PM
Hi,

I wouldn't call it a solution, but I dropped the support for filtering on that grid.

Regards
Tags
Grid
Asked by
Tomaž Lovrec
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Mallik
Top achievements
Rank 1
Tomaž Lovrec
Top achievements
Rank 1
Share this question
or