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

GridTableView events?

1 Answer 199 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lucania
Top achievements
Rank 1
Lucania asked on 21 Jul 2011, 03:31 AM
Hi, I have a RadGrid with a nested GridTableView. I am trying to hook up the OnPreRender event, but it doesn't ever seem to get called. After further experimentation, none of the events seem to be called on this object. The grid exhibits the same behaviour when removed from the AjaxManager. Do I need to do something else to hook up these events?

Thanks

ROSCO

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 26 Jul 2011, 08:44 AM
Hi ROSCO,

How do you attach the Event Handlers to the events of the grid? Dynamically in the code-behind or in the declaration of the grid?
Make sure that the grid has set runat="server" attribute. And if you register the handlers dynamically, do it on Page_Init.

Set handler in the declaration:
<telerik:RadGrid ID="RadGrid2" runat="server" OnPreRender="RadGrid2_PreRender">
</telerik:RadGrid>

Dynamically attach:
protected void Page_Init(object sender, EventArgs e)
{
    RadGrid2.PreRender+=new EventHandler(RadGrid2_PreRender);
}

C#:
protected void RadGrid2_PreRender(object sender, EventArgs e)
{
 
}

Greetings,
Vasil
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
Lucania
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or