dyl 你好,SheetView 下 IsRowBound() 方法用于判断某一特定行是否为绑定行,请通过以下代码测试:
- DataTable data = new DataTable();
- DataColumn col1 = new DataColumn("列一", typeof(System.String));
- DataColumn col2 = new DataColumn("列二", typeof(System.String));
- data.Columns.Add(col1);
- data.Columns.Add(col2);
- data.Rows.Add("1", "2");
- data.Rows.Add("1", "2");
- this.fpSpread1.Sheets[0].DataSource = data;
- this.fpSpread1.Sheets[0].AddUnboundRows(1, 3);
- List<int> bindrow = new List<int>(); ;
- for (int i = 0; i < this.fpSpread1.Sheets[0].RowCount; i++)
- {
- if (this.fpSpread1.Sheets[0].IsRowBound(i))
- {
- bindrow.Add(i);
- }
- }
复制代码 |