对于Spread for Windows Forms,可以通过控制单元格区域绑定实现分步显示。
代码示例如下:- // Create an adapter.
- FarPoint.Win.Spread.Data.SpreadDataBindingAdapter data = new FarPoint.Win.Spread.Data.SpreadDataBindingAdapter();
- // Assign the datasource to a data table.
- data.DataSource = dt;
- data.Spread = fpSpread1;
- data.SheetName = "Sheet1";
- data.MapperInfo = new FarPoint.Win.Spread.Data.MapperInfo(3, 2, 1, 1);
- data.FillSpreadDataByDataSource();
复制代码 |