Hello,
I'm using a RadGrid that is bound to a list of objects which gets set on page load (not postback).
RadGrid1.DataSource = myList;
RadGrid1.DataBind();
I've added columns that cause post backs such as imagebuttons and regular telerik button controls. When I click one of these buttons, the application throws an error in "RadGrid1_ItemCreated". The error occurs when attempting to access the grid data item and cast as my business object (Schedule). It seems the grid is no longer bound to my datasource since I'm no longer able to access this.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
if (e.Item is GridDataItem) {
Schedule tempSchedule = (Schedule)e.Item.DataItem;
I thought it may need to be reloaded on page load, but when I put a break point on page load it doesn't hit. When clicking a button in the grid it seems to go straight to "RadGrid1_ItemCreated". Could you please give me some suggestions for correcting this issue? Do I need to cache my business object list "myList"?
I'm using a RadGrid that is bound to a list of objects which gets set on page load (not postback).
RadGrid1.DataSource = myList;
RadGrid1.DataBind();
I've added columns that cause post backs such as imagebuttons and regular telerik button controls. When I click one of these buttons, the application throws an error in "RadGrid1_ItemCreated". The error occurs when attempting to access the grid data item and cast as my business object (Schedule). It seems the grid is no longer bound to my datasource since I'm no longer able to access this.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
if (e.Item is GridDataItem) {
Schedule tempSchedule = (Schedule)e.Item.DataItem;
I thought it may need to be reloaded on page load, but when I put a break point on page load it doesn't hit. When clicking a button in the grid it seems to go straight to "RadGrid1_ItemCreated". Could you please give me some suggestions for correcting this issue? Do I need to cache my business object list "myList"?