spread的基本应用

 this.spdSearchResult.ActiveSheet.Columns.Count = 8;//行数设定
   this.spdSearchResult.ActiveSheet.Columns[0,7].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;//单元格对齐方式设定,
//   spdSearchResult.ActiveSheet.SelectionStyle = FarPoint.Win.Spread.SelectionStyles.SelectionColors; 
   //Spreadの各列の見出しを設定する
   this.spdSearchResult.ActiveSheet.ColumnHeader.Cells[0,0].Text = "カラーコード";//列头设定

   //Spreadの各列の広さを設定する
   this.spdSearchResult.ActiveSheet.Columns[0].Width = 80;   
   //表示しない列を非表示にする
   this.spdSearchResult.ActiveSheet.Columns[4,7].Visible = false;

   FarPoint.Win.Spread.Column col;

   //非編集に設定する
   col = spdSearchResult.ActiveSheet.Columns[0, 3];
   col.Locked = true;

   FarPoint.Win.Spread.CellType.DateTimeCellType  cell;

   //データの表示フォーマットを日時式にする
   cell = new FarPoint.Win.Spread.CellType.DateTimeCellType();//单元格日期类型设定
   cell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime;

   col = spdSearchResult.ActiveSheet.Columns[6, 7];
   col.CellType = cell;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值