// *********************************************************************** // Assembly : JinYuan.ControlLib // Created : 08-09-2019 // // *********************************************************************** // // Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com // // // Blog: https://www.cnblogs.com/bfyx // GitHub:https://github.com/kwwwvagaa/NetWinformControl // gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git // // If you use this code, please keep this note. // *********************************************************************** using System; using System.Drawing; namespace JinYuan.ControlLib { /// /// Class DataGridViewColumnEntity. /// public class DataGridViewColumnEntity { /// /// Gets or sets the head text. /// /// The head text. public string HeadText { get; set; } /// /// Gets or sets the width. /// /// The width. public int Width { get; set; } /// /// Gets or sets the type of the width. /// /// The type of the width. public System.Windows.Forms.SizeType WidthType { get; set; } /// /// Gets or sets the data field. /// /// The data field. public string DataField { get; set; } /// /// Gets or sets the format. /// /// The format. public Func Format { get; set; } /// /// The text align /// private ContentAlignment _TextAlign = ContentAlignment.MiddleCenter; /// /// Gets or sets the text align. /// /// The text align. public ContentAlignment TextAlign { get { return _TextAlign; } set { _TextAlign = value; } } /// /// 自定义的单元格控件,一个实现IDataGridViewCustomCell的Control /// /// The custom cell. private Type customCellType = null; public Type CustomCellType { get { return customCellType; } set { if (!typeof(IDataGridViewCustomCell).IsAssignableFrom(value) || !value.IsSubclassOf(typeof(System.Windows.Forms.Control))) throw new Exception("行控件没有实现IDataGridViewCustomCell接口"); customCellType = value; } } } }