Hi there,
Apologies if this question is already documented, I couldn't find anything that would help me.
I am using the RadGrid, on a list of objects, "Request" (RadGrid1.DataSource = List<Request>). One property of "Request" is an object "Client". I don't want the object "Client" to be a column, but I would like for the property "Name" in "Client" to be shown. Ie. (String) Client.Name.
I managed to achieve this by Adding this on the ItemDataBound event as follows:
However, this appears to stop the column from being filterable. I would like for it to be possible to filter by Client.Name.
I realise it is not possible to set DataField="Client.Name". So I was wondering if there was another way I could achieve this?
Thanks in advance for any help!
FWIW I'm using WinXP, VS2008, .NET framework 3.5, and preferred language is C#.
Apologies if this question is already documented, I couldn't find anything that would help me.
I am using the RadGrid, on a list of objects, "Request" (RadGrid1.DataSource = List<Request>). One property of "Request" is an object "Client". I don't want the object "Client" to be a column, but I would like for the property "Name" in "Client" to be shown. Ie. (String) Client.Name.
I managed to achieve this by Adding this on the ItemDataBound event as follows:
| if (e.Item is GridDataItem) |
| { |
| int reqID; |
| String strReqID = ((GridDataItem)e.Item)["RequestID"].Text; |
| if (int.TryParse(strReqID, out reqID)) |
| { |
| ((GridDataItem)e.Item)["Client"].Text = GetClientNameFromRequest(reqID); |
| } |
| } |
However, this appears to stop the column from being filterable. I would like for it to be possible to filter by Client.Name.
I realise it is not possible to set DataField="Client.Name". So I was wondering if there was another way I could achieve this?
Thanks in advance for any help!
FWIW I'm using WinXP, VS2008, .NET framework 3.5, and preferred language is C#.