I am using a Gridview and so far everything is working great! 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
Use event 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;
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.