3 Answers, 1 is accepted
0
Hi Umar,
How to achieve your goal is demonstrated in this help article:
http://www.telerik.com/help/aspnet-ajax/grid-hide-expand-collapse-images-when-no-records.html
Kind regards,
Pavlina
the Telerik team
How to achieve your goal is demonstrated in this help article:
http://www.telerik.com/help/aspnet-ajax/grid-hide-expand-collapse-images-when-no-records.html
Kind regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
umar
Top achievements
Rank 1
answered on 15 Nov 2011, 10:51 AM
It Hides All Expand Buttons .Also Those who have the Chulds
0
Jayesh Goyani
Top achievements
Rank 2
answered on 15 Nov 2011, 11:47 AM
Hello,
Let me know if any concern.
Thanks,
Jayesh Goyani
public static void HideExpandColumnRecursive(GridTableView tableView) { GridItem[] nestedViewItems = tableView.GetItems(GridItemType.NestedView); foreach (GridNestedViewItem nestedViewItem in nestedViewItems) { foreach (GridTableView nestedView in nestedViewItem.NestedTableViews) { if (nestedView.Items.Count == 0) { System.Web.UI.WebControls.TableCell cell = nestedView.ParentItem["ExpandColumn"]; if (cell.Controls.Count == 0) { } else { cell.Controls[0].Visible = false; } nestedViewItem.Visible = false; } if (nestedView.HasDetailTables) { HideExpandColumnRecursive(nestedView); } } } } protected void RadGrid1_PreRender(object sender, EventArgs e) { HideExpandColumnRecursive(RadGrid1.MasterTableView); }Let me know if any concern.
Thanks,
Jayesh Goyani