问:我正在学习Spread for ASP.Net.
请问如何使用Preview row功能?
请问如何使用Preview row功能?
答:
1. 设置当前SheetView的PreviewRowVisible属性到true;
2. 设置当前SheetView的PreviewRowColumnIndex属性到特定的列号,Preview Row将显示该列信息;
3. 通过当前SheetView的PreviewRowStyle属性和其子属性设置Preview row的样式:例如可设置BackColor,Border,CssClass, Font, Margin,HorizontalAlign等Preview row样式。
一个例子代码片断如下:
FpSpread1.ActiveSheetView.PreviewRow = true;
FpSpread1.ActiveSheetView.PreviewRowColumnIndex = 2;
PreviewRowInfo previewRowInfo = new PreviewRowInfo();
previewRowInfo.BackColor = Color.GreenYellow;
previewRowInfo.Border.BorderColor = Color.Blue;
previewRowInfo.Border.BorderStyle = BorderStyle.Dotted;
previewRowInfo.Border.BorderSize = 2;
previewRowInfo.ForeColor = Color.Red;
previewRowInfo.HorizontalAlign = HorizontalAlign.Center;
FpSpread1.ActiveSheetView.PreviewRowStyle = previewRowInfo;
2. 设置当前SheetView的PreviewRowColumnIndex属性到特定的列号,Preview Row将显示该列信息;
3. 通过当前SheetView的PreviewRowStyle属性和其子属性设置Preview row的样式:例如可设置BackColor,Border,CssClass, Font, Margin,HorizontalAlign等Preview row样式。
一个例子代码片断如下:
FpSpread1.ActiveSheetView.PreviewRow = true;
FpSpread1.ActiveSheetView.PreviewRowColumnIndex = 2;
PreviewRowInfo previewRowInfo = new PreviewRowInfo();
previewRowInfo.BackColor = Color.GreenYellow;
previewRowInfo.Border.BorderColor = Color.Blue;
previewRowInfo.Border.BorderStyle = BorderStyle.Dotted;
previewRowInfo.Border.BorderSize = 2;
previewRowInfo.ForeColor = Color.Red;
previewRowInfo.HorizontalAlign = HorizontalAlign.Center;
FpSpread1.ActiveSheetView.PreviewRowStyle = previewRowInfo;