This is a migrated thread and some comments may be shown as answers.

How to change a Radgrid column value after binding?

1 Answer 1400 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nevra
Top achievements
Rank 1
Nevra asked on 23 Mar 2015, 04:09 PM
Hi,
I have a Radgrid and I bind it with SqlAdapter. My problem is that I want to change just one column's value. Is that possible? Thank you. 

My column name is IsShadow and it binds true or false. I cannot change it. If value is false or true, I change column text appearence not database update.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 26 Mar 2015, 01:09 PM
Hello Nevra,

Generally, you can change the cell text using the following approach:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = e.Item as GridDataItem;
        TableCell cell = item["ShipCountry"];
        cell.Text = "Success";
    }
}

Hope this helps. If you have different requirements or further instructions please elaborate on your specific scenario and send us sample screenshots or video demonstrating the desired behavior.

Regards,
Eyup
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Nevra
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or