Accessing Linq data in telerik grid ItemCreated method
- by Jack
Not sure if the title of this question makes sense, but here's my problem:
I have a telerik grid bound to a Linq data object, however, I limit the fields returned:
<IQueryable>filter = data.Select(x => new {x.ID, x.Name, x.Age});
I would like to access these fields in the ItemCreated method of the grid:
protected void rgPeople_ItemCreated(object sender, GridItemEventArgs e)
{
Telerik.Web.UI.GridDataItem item = (GridDataItem)e.Item;
?????? Person = (???????)e.Item.DataItem;
}
What do I declare ?????? as so that I can use:
String ID = Person.ID;
String Name = Person.Name; etc