Model view controller 在asp.net mvc中隐藏编辑表单
如果我的CustomerName字段名等于“MyCustomer”,我想隐藏对该行的编辑 如果客户名称==“MyCustomer,隐藏列编辑 如何根据“MyCustomer”隐藏列编辑 任何帮助都将以分数表示Model view controller 在asp.net mvc中隐藏编辑表单,model-view-controller,gridview,devexpress,hide,Model View Controller,Gridview,Devexpress,Hide,如果我的CustomerName字段名等于“MyCustomer”,我想隐藏对该行的编辑 如果客户名称==“MyCustomer,隐藏列编辑 如何根据“MyCustomer”隐藏列编辑 任何帮助都将以分数表示 settings.CommandButtonInitialize = (s, e) => { if (e.ButtonType == ColumnCommandButtonType.Edit) { MVCxGridView g = s as MVCxGridV
settings.CommandButtonInitialize = (s, e) => {
if (e.ButtonType == ColumnCommandButtonType.Edit) {
MVCxGridView g = s as MVCxGridView;
var value = (int)g.GetRowValues(e.VisibleIndex, "RowFieldName"); //use a correct field name and cast a resultant value to a correct value type
e.Visible = value > 10; // for example, only
}
};
幸运的是,我自己找到了解决办法。
这是有效的。希望这能帮助将来有同样问题的人
幸运的是,我自己找到了解决办法。
这是有效的。希望这能帮助将来有同样问题的人
settings.CommandButtonInitialize = (s, e) => {
if (e.ButtonType == ColumnCommandButtonType.Edit) {
MVCxGridView g = s as MVCxGridView;
var value = (int)g.GetRowValues(e.VisibleIndex, "RowFieldName"); //use a correct field name and cast a resultant value to a correct value type
e.Visible = value > 10; // for example, only
}
};