DataExcel 设置单元格,列,行只读 ReadOnly属性
来源:互联网 发布:使用java的游戏引擎 编辑:程序博客网 时间:2024/06/06 05:44
///清除所有行,列,合并单元格,扩展单元格,等 dataexcel1.Clear(); ///初始化默认行,列 dataexcel1.Init(); //获取行 通过GetRow函数获取行会自动创建行 IRow row = dataexcel1.GetRow(1); row.Height = 30; row = dataexcel1.GetRow(2); //设置行只读 row.InhertReadOnly = false; row.ReadOnly = true; row.BackColor = Color.AliceBlue; row.Height = 30; row = dataexcel1.GetRow(3); row.Height = 30; IColumn column = dataexcel1.GetColumn(1); column.Width = 120; column = dataexcel1.GetColumn(2); //设置列只读 column.InhertReadOnly = false; column.ReadOnly = true; column.Width = 120; column.BackColor = Color.AntiqueWhite; column = dataexcel1.GetColumn(3); column.Width = 120; column = dataexcel1.GetColumn(4); column.Width = 120; ICell cell = dataexcel1[1, 1]; cell.Name = "name1"; cell.Value = "只读单元格"; //设置单元格只读 cell.ReadOnly = true; cell.InhertReadOnly = false; cell = dataexcel1[2, 1]; cell.Name = "name2"; cell.Value = "只读单元格"; //设置单元格只读 cell.ReadOnly = true; cell.InhertReadOnly = false; cell = dataexcel1[3, 2]; cell.Value = "只读列"; cell = dataexcel1[2, 4]; cell.Value = "只读行";
效果如图:
阅读全文
0 0
- DataExcel 设置单元格,列,行只读 ReadOnly属性
- DataExcel 控件 获取行,列,单元格, 合并单元格 获取合并后的单元格,并设置颜色
- 设置Textbox只读属性,ReadOnly or ContentEditable
- 设置Textbox只读属性,ReadOnly or ContentEditable
- 设置列的只读属性
- TDataGridViewEx组件中设置单元格只读(ReadOnly)的.NET事件实现技术
- DataExcel 设置单元格 编辑控件 radiocheck,checkbox,textedit,combotext,numberedit
- C#中的DataGridView 的单元格、行、列只读控制
- DevExpress XtraGrid设置单元格只读
- 输入框只读属性readonly控制
- 设置checkbox为只读(readOnly)
- select 设置只读属性
- DataExcel 设置 函数
- ALV2:ALV列、行、单元格颜色设置
- ALV列、行、单元格颜色设置
- ALV设置行/列/单元格的颜色
- Functional ALV 行、列、单元格颜色设置
- OOALV 行、列和单元格颜色设置
- android 获取应用程序包名,图标,入口Activity类
- CentOS-6.3安装使用MongoDB
- 1.4抽象数据类型和数据结构
- 简单的小区公告,系统公告
- linux如何挂载windows下的共享文件
- DataExcel 设置单元格,列,行只读 ReadOnly属性
- Linux 简单修改权限命令
- CentOS 7安装Nginx
- Linux 起停jar命令
- 树形菜单js实现
- jvm gc参数解释以及提供系统堆益处日志监控方法
- Android Studio:模拟器不能运行 控制台显示 VCPU shutdown request
- 【 ORACLE】 ROW_NUMBER() OVER() 分析函数实践
- SAP采购价格条件介绍