Mehmet Tirgil
Top achievements
Rank 1
Mehmet Tirgil
asked on 15 Dec 2009, 09:39 AM
Hi,
i use hierarchy table properties. How can i disable sortinh, filtering in hierarchy table. I want to use these properties just in master table.
3 Answers, 1 is accepted
0
Hello Mehmet,
Best regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
To disable filtering and sorting for detail tables in grid hierarchy, consider setting the AllowSorting/AllowFilteringByColumn properties of the corresponding GridTableView instances to false. Further information about the relation between RadGrid and the detail tables in its hierarchy can be gathered from here.
Best regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mehmet Tirgil
Top achievements
Rank 1
answered on 15 Dec 2009, 12:23 PM
I use this function in Ragdrig_preRender event.
Public Sub HideExpandColumnRecursive(ByVal tableView As GridTableView)
Dim NestedViewItems As GridItem() = tableView.GetItems(GridItemType.NestedView)
For Each NestedViewItem As GridNestedViewItem In NestedViewItems
For Each NestedView As GridTableView In NestedViewItem.NestedTableViews
If NestedView.Items.Count = 0 Then
Dim Cell As TableCell = NestedView.ParentItem("ExpandColumn")
Cell.Controls(0).Visible = False
NestedViewItem.Visible = False
End If
NestedView.AllowFilteringByColumn = False
NestedView.AllowSorting = False
NestedView.Columns.FindByUniqueName("ContentHeader").Visible = False
If NestedView.HasDetailTables Then
HideExpandColumnRecursive(NestedView)
End If
Next
Next
End Sub
the property of NestedView.Columns.FindByUniqueName("ContentHeader").Visible = False is working properly, but
the properties of NestedView.AllowFilteringByColumn = False and NestedView.AllowSorting = False do not work.
i do not understand.
0
Mehmet Tirgil
Top achievements
Rank 1
answered on 15 Dec 2009, 04:08 PM
Hi,
I solved my problem. Using AllowSorting="true" code in MasterTableView place instead of telerik:RadGrid place. So filtering, sorting is just in mastertableview.
Thanks