I开发者_运维知识库 have a radgrid with GridButtonColumn as one of the column.I need to change that column's text displayed in the grid during ItemCommand event. for eg. if text is 'yes' after ItemCommand event, it should be changed to 'no'. How we can implement this?
See: How to change GridButtonColumn image/text at runtime
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
LinkButton lbutton = item["ButtonUniqueName"].Controls[0] as LinkButton;
if (lbutton.Text == "yes")
{
lbutton.Text = "no";
}
}
}
精彩评论