Spread for ASP.NET 8.0 Product Documentation
PreviewRowColumnIndex Property
Example 


Gets or sets the index of the preview row column.
Syntax
'Declaration
 
Public Property PreviewRowColumnIndex As Integer
'Usage
 
Dim instance As SheetView
Dim value As Integer
 
instance.PreviewRowColumnIndex = value
 
value = instance.PreviewRowColumnIndex
public int PreviewRowColumnIndex {get; set;}

Property Value

Index of the column of the preview row
Example
This example customizes the appearance of the preview row.
// Add this style definition inside the STYLE element in the Default.aspx page.
.previewer  
 {  
       border-style:dashed;
     border-color:Green;
     border-width:thick;
     font-family:Arial;
     font-style:italic;
     color:Blue;
     background-color:Yellow;
     text-align:right;
     text-decoration:'underline'|'overline'|'line-through'|'blink';
     vertical-align:bottom;
 } 


// Define the background.
FarPoint.Web.Spread.Background bg = new FarPoint.Web.Spread.Background();
bg.SelectedBackgroundImageUrl = "picture/Winter.jpg";
bg.BackgroundImageUrl = "picture/Image.bmp";
FarPoint.Web.Spread.Border bd1 = new FarPoint.Web.Spread.Border();
bd1.BorderColor = System.Drawing.Color.Blue;
bd1.BorderStyle = System.Web.UI.WebControls.BorderStyle.Dashed;

// Set the preview row properties.
FarPoint.Web.Spread.PreviewRowInfo previewRowInfo = new FarPoint.Web.Spread.PreviewRowInfo();
previewRowInfo.BackColor = Color.Blue;
previewRowInfo.Background = bg;
previewRowInfo.Border = bd1;
previewRowInfo.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
previewRowInfo.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Middle; 
previewRowInfo.TabStop = true;
previewRowInfo.Margin.Bottom = 10;
previewRowInfo.Margin.Left = 10;
previewRowInfo.Margin.Right = 10;
previewRowInfo.Margin.Top = 10;
previewRowInfo.ForeColor = System.Drawing.Color.Green;
previewRowInfo.CssClass = "previewer";    // If set to previewer, other setting have no effect.
previewRowInfo.Font.Bold = true;
previewRowInfo.Font.Italic = true;
previewRowInfo.Font.Overline = true;
previewRowInfo.Font.Size = 20;
previewRowInfo.Font.Underline = true;
previewRowInfo.Font.Strikeout = true;
previewRowInfo.Font.Name = "Verdana";   // Try with some other name of font.
ListBox1.Items.Add(previewRowInfo.IsEmpty.ToString());
ListBox1.Items.Add(previewRowInfo.CanSerializeXml.ToString());

// Use the preview row.
FpSpread1.ActiveSheetView.PreviewRowColumnIndex = 0;
FpSpread1.ActiveSheetView.PreviewRowStyle = previewRowInfo;
FpSpread1.ActiveSheetView.PreviewRowVisible = true;
' Add this style definition inside the STYLE element in the Default.aspx page.
.previewer  
 {  
       border-style:dashed;
     border-color:Green;
     border-width:thick;
     font-family:Arial;
     font-style:italic;
     color:Blue;
     background-color:Yellow;
     text-align:right;
     text-decoration:'underline'|'overline'|'line-through'|'blink';
     vertical-align:bottom;
 } 


' Define the background.
Dim bg As New FarPoint.Web.Spread.Background()
bg.SelectedBackgroundImageUrl = "picture/Winter.jpg"
bg.BackgroundImageUrl = "picture/Image.bmp"
Dim bd1 As New FarPoint.Web.Spread.Border()
bd1.BorderColor = System.Drawing.Color.Blue
bd1.BorderStyle = System.Web.UI.WebControls.BorderStyle.Dashed

' Set the preview row properties.
Dim previewRowInfo As New FarPoint.Web.Spread.PreviewRowInfo()
previewRowInfo.BackColor = Color.Blue
previewRowInfo.Background = bg
previewRowInfo.Border = bd1
previewRowInfo.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center
previewRowInfo.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Middle
previewRowInfo.TabStop = True
previewRowInfo.Margin.Bottom = 10
previewRowInfo.Margin.Left = 10
previewRowInfo.Margin.Right = 10
previewRowInfo.Margin.Top = 10
previewRowInfo.ForeColor = System.Drawing.Color.Green
previewRowInfo.CssClass = "previewer"  ' If set to previewer, other setting have no effect.
previewRowInfo.Font.Bold = True
previewRowInfo.Font.Italic = True
previewRowInfo.Font.Overline = True
previewRowInfo.Font.Size = 20
previewRowInfo.Font.Underline = True
previewRowInfo.Font.Strikeout = True
previewRowInfo.Font.Name = "Verdana"  ' Try with some other name of font.
ListBox1.Items.Add(previewRowInfo.IsEmpty.ToString())
ListBox1.Items.Add(previewRowInfo.CanSerializeXml.ToString())

' Use the preview row.
FpSpread1.ActiveSheetView.PreviewRowColumnIndex = 0
FpSpread1.ActiveSheetView.PreviewRowStyle = previewRowInfo
FpSpread1.ActiveSheetView.PreviewRowVisible = True
Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

SheetView Class
SheetView Members

 

 


Copyright © GrapeCity, inc. All rights reserved.