开发者

Set value column value of the selected row in RadGrid

I need to set the value of a particular column of the selected row in my telerik RadGrid. I have tried the following, but it didn't work.

foreach (GridDataItem r开发者_JAVA技巧ow in RadGrid1.Items)  
{  
    if (row.Selected)  
    {  
      row["MessageStatus"].Text = myMsg.MessageStatus;  
    break;  
  }  
}  
RadGrid1.Rebind();  


You can change the text (value) of cells in RadGridView when looping over them in the following way

        using (this.radGridView1.DeferRefresh())
        {
            foreach (GridViewRowInfo row in this.radGridView1.Rows)
            {
                row.Cells["ColumnUniqueName"].Value = "Some Value";
            }            
        }

Hope that helps

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜