private void gvLampConfig_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e)
{
GridView _view = sender as GridView;
if (_view.FocusedColumn.Name == "colSavePowerGp1")//当列等于colSavePowerGp1
{
string _type = _view.GetRowCellDisplayText(gvLampConfig.FocusedRowHandle, "OptStatusText_gp1");
if (!_type.Equals("节能"))//当列OptStatusText_gp1的列值不等于OptStatusText_gp1
{
e.Cancel = true;
ShowToolTip(toolTipController, "提示", "当是【调光状态】是节能模式情况,可以设置该值!");
}
}
}
public static void ShowToolTip(ToolTipController toolTip, string title, string content)
{
Point _mousePoint = Control.MousePosition;
toolTip.ShowHint(content, title, _mousePoint);
}
/// <summary>
/// 设置RepositoryItem是否可编辑
/// 说明:
/// 在ShowingEditor事件中使用
/// </summary>
/// <param name="view">GridView</param>
/// <param name="focusedColumnName">需要设置的列名称</param>
/// <param name="conditonHanlder">判断委托</param>
/// <param name="toolTip">ToolTipController</param>
/// <param name="title">当条件委托成立的时候提示标题</param>
/// <param name="content">当条件委托成立的时候提示内容</param>
/// <param name="e">CancelEventArgs</param>
private void CustomShowingEditorWithToolTip(GridView view, string focusedColumnName, Func<object, bool> conditonHanlder, ToolTipController toolTip, string title, string content, CancelEventArgs e)
{
if (view.FocusedColumn.Name.Equals(focusedColumnName))
{
if (conditonHanlder(view.GetFocusedRow()))
{
e.Cancel = true;
Point _mousePoint = Control.MousePosition;
toolTip.ShowHint(content, title, _mousePoint);
}
}
}
private void gvLampConfig_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e)
{
GridView _view = sender as GridView;
CustomShowingEditorWithToolTip(_view, "colSavePowerGp1", arg => ((LampSelfRunCfgParamter)arg).OptStatusText_gp1 != "节能", toolTipController, "提示", "当是【调光状态】是节能模式情况,可以设置该值!", e);
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有