Hi,
I'm binding my grid to a collection of objects, unfortunately, the object only contains an id of another object that I want to display the Display Value for. So rather than make a service tier change, I'm handling the retrieval within the UI.
My question is, do DataItem Attributes have a DataField property value so I can bind to them?
I'm using NeedsDatasource to bind and then explicitly using telerik:GridBoundColumn to handle which columns are displayed.
I'm adding my Attributes in the code behind in ItemDataBound, like this:
Is there a way to bind a column to the Attribute named "Attribute1"?
Thanks!
Coy
I'm binding my grid to a collection of objects, unfortunately, the object only contains an id of another object that I want to display the Display Value for. So rather than make a service tier change, I'm handling the retrieval within the UI.
My question is, do DataItem Attributes have a DataField property value so I can bind to them?
I'm using NeedsDatasource to bind and then explicitly using telerik:GridBoundColumn to handle which columns are displayed.
I'm adding my Attributes in the code behind in ItemDataBound, like this:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
Object obj1= (Object)e.Item.DataItem;
e.Item.Attributes.Add("Attribute1", DataSet.Find(p => p.Code == obj1.Code).DisplayValue);
}
}
Is there a way to bind a column to the Attribute named "Attribute1"?
Thanks!
Coy