public Column CreateCellColumn(string value, string cellName, int index, int rowIndex = 0, int pIndex = 0, int width = 100, int height = 35, FishYuCellStyle fishYuCellStyle = null, bool isVerticelColumn = true, CellType cellType = CellType.Text, ICellSelfDefineView icellSelfDefineView = null) { Column column = new Column(); column.Value = value; column.Name = cellName; column.Index = index; column.PColumnIndex = pIndex; column.RowIndex = rowIndex; column.PRowIndex = rowIndex - 1; column.Width = width; column.Height = height; column.isVetical = isVerticelColumn; if (fishYuCellStyle == null) { fishYuCellStyle = FishYuCellStyle.DefaultCellStyle; } column.iCellSelfDefineView = icellSelfDefineView; column.CellStyle = fishYuCellStyle; column.CellType = cellType; return(column); }
/// <summary> /// 创建一列默认样式, 默认type为文本格式 /// </summary> /// <param name="name">列名</param> /// <param name="pIndex">某父列的Index</param> /// <param name="index">该列的index</param> /// <param name="rowIndex"></param> /// <param name="pIndex"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="fishYuCellStyle"></param> /// <returns></returns> public Column CreateTitleColumn(string name, int index, int rowIndex = 0, int pIndex = 0, int width = 100, int height = 35, FishYuCellStyle fishYuCellStyle = null, CellType cellType = CellType.Text, ICellSelfDefineView icellSelfDefineView = null) { Column column = new Column(); column.Value = name; column.Index = index; column.PColumnIndex = pIndex; column.RowIndex = rowIndex; column.PRowIndex = rowIndex - 1; column.Width = width; column.Height = height; if (fishYuCellStyle == null) { fishYuCellStyle = FishYuCellStyle.DefaultCellStyle; } column.iCellSelfDefineView = icellSelfDefineView; column.CellStyle = fishYuCellStyle; column.CellType = cellType; return(column); }