Hi,
Can anyone help. I have a grid with a GridDropDownColumn as such:
<telerik:GridDropDownColumn UniqueName="CategoryName" HeaderText="Category" DataSourceID="DDL_DS" SortExpression="DC_Name" ListTextField="DC_Name" ListValueField="DC_Id" DataField="DC_Id" />
Grouping is enabled, and when a user drags the Category Header to the grouping pane, my grid groups fine. However, the group header displays the Id, not the Name. I've tried using ItemDataBound as below, but I just can't seem to grab that ListTextField.
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
Can anyone help. I have a grid with a GridDropDownColumn as such:
<telerik:GridDropDownColumn UniqueName="CategoryName" HeaderText="Category" DataSourceID="DDL_DS" SortExpression="DC_Name" ListTextField="DC_Name" ListValueField="DC_Id" DataField="DC_Id" />
Grouping is enabled, and when a user drags the Category Header to the grouping pane, my grid groups fine. However, the group header displays the Id, not the Name. I've tried using ItemDataBound as below, but I just can't seem to grab that ListTextField.
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridGroupHeaderItem)
{
GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;
DataRowView groupDataRow = (DataRowView)e.Item.DataItem;
item.DataCell.Text =
"( " + groupDataRow["DC_Id"].ToString() + " ) " ;
}
}
Thanks in advance,
J