开发者

how to change radgrid's GridButtonColumn's text in radgrid's ItemCommand event?

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";
        } 
    } 
} 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜