System.Web.UI.WebControls Namespace DataGridPagerStyle Class
Merges the style of a specified Style object with this instance of the DataGridPagerStyle class.
[ VB ]
Overrides Public Sub MergeWith ( _
ByVal s As Style _
)
[ C# ]
public override void MergeWith (
Style s
);
[ C++ ]
public: void MergeWith (
Style* s
);
[ JScript ]
public override function MergeWith (
s : Style
);
- s
- The style to merge with.
Use the MergeWith method to combine the style properties of a specified Style object with this instance of the DataGridPagerStyle class. If a property from this instance is already set to a value, the property is unchanged. If a property is not set, this method sets that property with the value from the corresponding property of the Style object.
The following example demonstrates how to use the MergeWith method to combine the properties of a Style object with a DataGridPagerStyle object.
void Page_Load ( Object src, EventArgs e ) {
// create a Style object.
Style myStyle = new Style ( );
// Set style properties.
myStyle.BackColor = System.Drawing.Color.Lavender;
myStyle.ForeColor = System.Drawing.Color.Blue;
// Merge Style object with DataGridPagerStyle object.
myGrid.PagerStyle.MergeWidth ( myStyle );
bindGrid ( );
}
Sub Page_Load ( src As Object, e As EventArgs )
' create a Style object.
Dim myStyle As New Style ( )
' Set style properties.
myStyle.BackColor = System.Drawing.Color.Lavender
myStyle.ForeColor = System.Drawing.Color.Blue
' Merge Style object with DataGridPagerStyle object.
myGrid.PagerStyle.MergeWidth ( myStyle )
bindGrid ( )
End Sub |
|
C# |
VB |
DataGridPagerStyle Members CopyFrom Reset