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

[Solved] Custom RadGrid Control

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 01 Jun 2009, 05:52 PM
I created a custom RadGrid Control and when I click on PDF Export button the OnItemCreated is called before the OnItemCommand, but it only happens to 1 of my 10 web pages.  How can this be fixed?  Thanks for the help.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 04 Jun 2009, 12:47 PM
Hi Robert,

This help article describes in detail the event sequence in RadGrid for ASP.NET AJAX. Please note that, first, your ViewState should be enabled (the default value). What is more, you need to subscribe to RadGrid's ItemCreated event before RadGrid has rebound and recreated its items from the ViewState. Under regular conditions, this means you need to hook up to ItemCreated in Page_Init:

protected void Page_Init(object sender, EventArgs e) 
    RadGrid1.ItemCreated += new Telerik.Web.UI.GridItemEventHandler(RadGrid1_ItemCreated); 


Greetings,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or