Hello,
I am currently working on a project with a RadGrid.
The Grid has 2 levels: master and detail.
The Settings of the Grid and the DetailView are in the
Page_Load:
This is the code for the event DetailTableDataBind:
How can I hide some of the columns in detailView?
If I add the following lines into Page_Load:
It gives me the following error:
(It seems the RadGrid doesn’t yet recognize these columns)
How can I hide these columns?
Thanks,
Daniel.
I am currently working on a project with a RadGrid.
The Grid has 2 levels: master and detail.
The Settings of the Grid and the DetailView are in the
Page_Load:
RadGrid1.MasterTableView.AllowPaging = FalseDim tableViewOrders = New GridTableView(RadGrid1)RadGrid1.MasterTableView.DetailTables.Add(tableViewOrders)tableViewOrders.AllowPaging = TruetableViewOrders.PageSize = 10RadGrid1.AllowSorting = TrueRadGrid1.ClientSettings.Scrolling.UseStaticHeaders = TrueRadGrid1.AllowFilteringByColumn = TrueRadGrid1.MasterTableView.HeaderStyle.Width = Unit.Pixel(200)RadGrid1.ClientSettings.EnableRowHoverStyle = TrueRadGrid1.MasterTableView.AllowNaturalSort = FalsetableViewOrders.AllowNaturalSort = FalseThis is the code for the event DetailTableDataBind:
Private Sub RadGrid1_DetailTableDataBind(sender As Object, e As GridDetailTableDataBindEventArgs) Handles RadGrid1.DetailTableDataBind 'If rep.Ready_Data.Tables.Count > 1 Then Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem) Dim cellID As TableCell = dataItem("_key_id") Dim ConnectID As String = cellID.Text rep.Ready_Data.Tables(1).DefaultView.RowFilter = "" rep.Ready_Data.Tables(1).DefaultView.RowFilter = "_parent_key_id = " & ConnectID e.DetailTableView.DataSource = rep.Ready_Data.Tables(1).DefaultView End SubHow can I hide some of the columns in detailView?
If I add the following lines into Page_Load:
tableViewOrders.GetColumn("_parent_key_id").Display = FalsetableViewOrders.GetColumn("key_id").Display = False
It gives me the following error:
Cannot find a column with UniqueName '_parent_key_id'Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Telerik.Web.UI.GridException: Cannot find a column with UniqueName '_parent_key_id'Source Error: Line 208: tableViewOrders.GetColumn("_parent_key_id").Display = FalseLine 209: tableViewOrders.GetColumn("key_id").Display = False(It seems the RadGrid doesn’t yet recognize these columns)
How can I hide these columns?
Thanks,
Daniel.