- //不根据dt自动生成列
- fpSpread1.ActiveSheet.AutoGenerateColumns = false;
- //设置第一列绑定ds中列名
- fpSpread1.ActiveSheet.Columns[0].DataField = "IsChecked";
- //第一列的单元格类型
- fpSpread1.ActiveSheet.Columns[0].CellType = new CheckBoxCellType();
- //第二列绑定的列名
- fpSpread1.ActiveSheet.Columns[1].DataField = "IsChecked";
- //第二列单元格类型
- fpSpread1.ActiveSheet.Columns[2].CellType = new DateTimeCellType();
复制代码 |