FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > ISheetStyleModel Interface : SetDirectAltRowInfo Method |
'Usage Dim instance As ISheetStyleModel Dim index As Integer Dim info As StyleInfo instance.SetDirectAltRowInfo(index, info)
"Direct" in the style model means "not composite" or "not inherited." This method, SetDirectAltRowInfo, sets the alternating style properties. The alternating style is used by the viewport controls for merging alternating row styles with the composite style for a cell immediately prior to rendering.
SetDirectInfo sets the other style properties of a cell, column, or row directly.
The index (zero-based) must be between 0 and (AltRowCount-1).
FarPoint.Win.Spread.Model.ISheetStyleModel ssm; FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData"); FarPoint.Win.Spread.StyleInfo si; ssm = (FarPoint.Win.Spread.Model.ISheetStyleModel)fpSpread1.ActiveSheet.Models.Style; ns.BackColor = Color.LightBlue; fpSpread1.NamedStyles.Add(ns); ssm.SetDirectAltRowInfo(0, ns); si = ssm.GetDirectAltRowInfo(0, null); label1.Text = "The backcolor of the first alternating row is " + si.BackColor.ToString();
Dim ssm As FarPoint.Win.Spread.Model.ISheetStyleModel Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData") Dim si As FarPoint.Win.Spread.StyleInfo ssm = FpSpread1.ActiveSheet.Models.Style ns.BackColor = Color.LightBlue FpSpread1.NamedStyles.Add(ns) ssm.SetDirectAltRowInfo(0, ns) si = ssm.GetDirectAltRowInfo(0, Nothing) Label1.Text = "The backcolor of the first alternating row is " & si.BackColor.ToString()
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10