你好,我测试隐藏第二列,没有重现你的问题。
测试代码:- private void Form1_Load(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.GridLine HGridLine = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Red);
- FarPoint.Win.Spread.GridLine VGridLine = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Chartreuse);
- this.fpSpread1.Sheets[0].HorizontalGridLine = HGridLine;
- this.fpSpread1.Sheets[0].VerticalGridLine = VGridLine;
- this.fpSpread1.PrintSheet(this.fpSpread1.ActiveSheet);
- }
- private void fpSpread1_PrintMessageBox(object sender, FarPoint.Win.Spread.PrintMessageBoxEventArgs e)
- {
- if (e.BeginPrinting)
- {
- this.fpSpread1.ActiveSheet.Columns[1].Visible = false;
- }
- else
- {
- this.fpSpread1.ActiveSheet.Columns[1].Visible = true;
- }
- }
复制代码 效果图:
png
请你参考代码进行设置,如果仍不能解决问题,请制作 Demo 上传到论坛,便于确定问题。 |