回复 1楼cure_shy的帖子
可以试试技术手册上提供的办法:
- private void Form1_Load(object sender, EventArgs e)
- {
- FarPoint.Win.BevelBorder bord = new FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised, Color.Red, Color.Blue);
- fpSpread1.Sheets[0].Cells[0, 1, 10, 1].Text = "Preview Row";
- fpSpread1.Sheets[0].PreviewRowInfo.Visible = true;
- fpSpread1.Sheets[0].PreviewRowInfo.BackColor = Color.BurlyWood;
- fpSpread1.Sheets[0].PreviewRowInfo.ForeColor = Color.Black;
- fpSpread1.Sheets[0].PreviewRowInfo.Border = bord;
- }
- private void fpSpread1_PreviewRowFetch(object sender, FarPoint.Win.Spread.PreviewRowFetchEventArgs e)
- {
- FarPoint.Win.Spread.SheetView sheetView = e.View.GetSheetView();
- if (sheetView.SheetName == "Sheet1")
- {
- if (e.PreviewRowContent == string.Empty)
- e.PreviewRowContent = "The preview row content is empty";
- if ((e.Row + 1) % 2 == 0)
- e.PreviewRowContent = string.Format("Preview Row Content is: {0}", e.PreviewRowContent);
- }
- }
复制代码
文档路径:Spread Windows Forms 7.0 Product Documentation > Developer's Guide > Customizing Row or Column Interaction > Allowing User Interaction with Rows and Columns > Setting up Preview Rows |