I want to change the text displayed on a rad grid based on the current text it had
here is the code-behind in C#
EXAMPLE A
An awkward workaround I found is to use a hidden column replica like this
EXAMPLE B
This works nice, but not so nice when you are working with over 10 columns
that would make 10 more hidden replicas
Is there another way to make it work as I desired in the EXAMPLE A
thanks in advance
here is the code-behind in C#
EXAMPLE A
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem dataItem = (GridDataItem)e.Item; //Edits the text value of the column "Flow" if (dataItem["Flow"].Text == "1") { dataItem["Flow"].Text = "Outcome"; } if (dataItem["Flow"].Text == "2") { dataItem["Flow"].Text = "Income"; } } }An awkward workaround I found is to use a hidden column replica like this
EXAMPLE B
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem dataItem = (GridDataItem)e.Item; //Edits the text value of the column "Flow" if (dataItem["FlowReplica"].Text == "1") { dataItem["Flow"].Text = "Outcome"; } if (dataItem["FlowReplica"].Text == "2") { dataItem["Flow"].Text = "Income"; } } }This works nice, but not so nice when you are working with over 10 columns
that would make 10 more hidden replicas
Is there another way to make it work as I desired in the EXAMPLE A
thanks in advance