views:

46

answers:

2

hi my dear friends:

in my rad grid i have a boundColumn(system.string) that i want to change it's null value to another customize text...

how can i check and change the Text Of the DataBound column of My telerik RadGrid?

thanks for your future answer

A: 

this was my answer :

protected void grd_ItemDataBound(object sender, GridItemEventArgs e)
{

    if (e.Item is GridDataItem)
    {
        GridDataItem dataItem = (GridDataItem)e.Item;

        //if (string.IsNullOrEmpty(dataItem["Test"].Text))
        if(dataItem["Test"].Text == " ")
        {
            dataItem["Test"].Text = "Empty";
            dataItem["Test"].ForeColor = ColorTranslator.FromHtml("#006E6E");
        }
    }

}
LostLord
A: 

You can simply use the GridBoundColumn.EmptyDataText property.

bugventure