应该是产品本身的bug,可以换一个思路来隐藏第二个子表,代码如下
- private void SpdDspQuery1_ChildViewCreated(object sender, ChildViewCreatedEventArgs e)
- {
- if ((e.SheetView.DataSource as List<Marks>).FirstOrDefault().Subject.Contains("Subject2"))
- {
- e.SheetView.SetRowHeight(-1,0);
- e.SheetView.ColumnHeader.Visible = false;
- }
- else
- {
- e.SheetView.Columns[1].Label = "科目";
- }
- }
复制代码 |