ASPxgridview 编辑列初始化事件

在初始化编辑咧的时候,给其赋值或者是disable等等....

贴上代码

 protected void master_CellEditorInitialize(object sender, ASPxGridViewEditorEventArgs e)
        {if (e.Column.FieldName.Equals("XXX"))
            {
                e.Editor.ClientEnabled = false;
                e.Editor.DisabledStyle.ForeColor = System.Drawing.Color.Black;
            }
            if (e.Column.FieldName.Equals("ZZZ"))
            {
                e.Editor.ClientEnabled = false;
                e.Editor.DisabledStyle.ForeColor = System.Drawing.Color.Black;
            }
            if (e.Column.FieldName.Equals("CCC"))
            {
                e.Editor.ClientEnabled = false;
                e.Editor.DisabledStyle.ForeColor = System.Drawing.Color.Black;
            }
            if (e.Column.FieldName.Equals("VVV"))
            {
                e.Editor.ClientEnabled = false;
                e.Editor.DisabledStyle.ForeColor = System.Drawing.Color.Black;
            }
        }

 

posted @ 2013-09-05 09:07  南修子  阅读(601)  评论(0编辑  收藏  举报