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

Self-referencing hierarchy and PreRenderComplete

1 Answer 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gilbert
Top achievements
Rank 1
Gilbert asked on 08 Jul 2011, 12:29 AM
Hi,

I'm trying to set up the RadGrid for self-referencing using HierarchyLoadMode = Client. I'm seeing a lot of "No Child Records Found" in my grid and read that I need to hide them during PreRenderComplete. However, my grid is inside a usercontrol so the PreRenderComplete event doesn't fire. Under regular circumstances I should to fire the method in the Page's PreRenderComplete, but this usercontrol is being wrapped into a sharepoint webpart which I don't have PreRenderComplete event for.

Is there any other way to make it possible to hide the "No Child Records Found" nested table views? I can't hide it during PreRender because it is Client Load Mode.

Thanks,
Gilbert

1 Answer, 1 is accepted

Sort by
0
Genti
Telerik team
answered on 13 Jul 2011, 02:53 PM
Hello Gilbert,

In such case an easy solution would be to expose the grid object of the user control via a public property.
This way you can handle the Page_PreRenderComplete in your page(where you are referencing the user control) properly.

public void Page_PreRenderComplete(object sender, EventArgs e)
{
    RadGrid someGrid = (RadGrid)grd.GridObject;
 
    grd.HideExpandColumnRecursive(someGrid.MasterTableView);
}

I am also attaching a simple solution.

Best wishes,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Gilbert
Top achievements
Rank 1
Answers by
Genti
Telerik team
Share this question
or