[英]I want to make a entire row from a gridview “ReadOnly”
I am using a Gridview and so far everything is working great! 我正在使用Gridview,到目前为止,一切都很好! My question is how do I make the current row as a read only if a specific condition become false?
我的问题是,如果特定条件为假,如何将当前行设为只读? I have tested and tried a few examples but with no luck.
我已经测试并尝试了一些示例,但是没有运气。 I found a way to make the column read only but im unable to make the entire row read only.
我找到了一种方法使该列为只读,但是即时通讯无法使整个行变为只读。 Thanks in advance, Irfan
在此先感谢Irfan
Use event ShowingEditor
. 使用事件
ShowingEditor
。
private void myGridView_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e) {
var gv = sender as GridView;
if (/* your condition to determine if the row is readokly */ ) {
e.Cancel = true;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.