I want to be able to set an item to a currency or date format depending upon its name.
Something like the following, but for the ItemDataBound event, not the ColumnCreated event.
How would I be able to accomplish that?
Something like the following, but for the ItemDataBound event, not the ColumnCreated event.
How would I be able to accomplish that?
protected void RadGrid1_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e)
{
if (e.Column is GridBoundColumn && (e.Column as GridBoundColumn).DataField == "Sales")
{
(e.Column as GridBoundColumn).DataFormatString = "{0:C}";
}
}