如何禁用要选择的列? [英] How can I disable a column to be selected?
本文介绍了如何禁用要选择的列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个网格视图并使用下面的代码使其可以在任何地方点击
I have a grid view and use code bellow to make it clickable anywhere
e.Row.Attributes["onmouseover"] =
"javascript:setMouseOverColor(this);";
e.Row.Attributes["onmouseout"] =
"javascript:setMouseOutColor(this);";
e.Row.Attributes["onclick"] =
ClientScript.GetPostBackClientHyperlink
(this.GridView1, "Select$" + e.Row.RowIndex);
我想在每行的第一行添加一个列,如复选框。
我需要检查每个复选框而不选择行。
现在当我勾选复选框时,该行将被选中。我不想要它。
I want to add a column at the first of each row like a checkbox.
I need to check each checkbox without selecting row.
now when I check the checkbox, the row will be selected. and I do not want it.
推荐答案
+ e.Row.RowIndex);
" + e.Row.RowIndex);
我想在每行的第一行添加一个列,如复选框。
我需要检查每个复选框而不选择行。
现在当我选中复选框时,行将被选中。我不想要它。
I want to add a column at the first of each row like a checkbox.
I need to check each checkbox without selecting row.
now when I check the checkbox, the row will be selected. and I do not want it.
这篇关于如何禁用要选择的列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文