我想禁用gridview中的行 [英] I want to disable the row in the gridview

查看:96
本文介绍了我想禁用gridview中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,

当我在同一行的组合框中选择特定文本时,我想禁用gridview中的行。

Sir,
I want to disable the row in the gridview when i am selecting the particular text in the combo box which is in the same row.

推荐答案

尝试

Try
private void MyGrid_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) 
{
    if e.Row.RowType == DataControlRowType.DataRow //&& Dropdown condition here
        e.Row.Enabled = (MyGrid.PageIndex <> 0 OrElse e.Row.RowIndex <> 2)
}


这篇关于我想禁用gridview中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆