lud 你好,
1.可以设置 SheetView 下 AllowPage 属性为 false,测试代码:- DataTable table = new DataTable();
- DataColumn col=new DataColumn("列一",typeof(System.String));
- table.Columns.Add(col);
- for (int i = 0; i < 100; i++)
- {
- table.Rows.Add("i");
- }
- FpSpread1.Sheets[0].DataSource=table;
- FpSpread1.Sheets[0].AllowPage = false;
复制代码
2.或者设置 SheetView 的 PageSize 属性为读取数据行数,测试代码:- DataTable table = new DataTable();
- DataColumn col=new DataColumn("列一",typeof(System.String));
- table.Columns.Add(col);
- for (int i = 0; i < 100; i++)
- {
- table.Rows.Add("i");
- }
- FpSpread1.Sheets[0].DataSource=table;
- FpSpread1.Sheets[0].PageSize = table.Rows.Count;
复制代码 |