System.Web.UI.WebControls Namespace DataGridPagerStyle Class
Copies the style of a specified Style object into this instance of the DataGridPagerStyle class.
[ VB ]
Overrides Public Sub CopyFrom ( _
ByVal s As Style _
)
[ C# ]
public override void CopyFrom (
Style s
);
[ C++ ]
public: void CopyFrom (
Style* s
);
[ JScript ]
public override function CopyFrom (
s : Style
);
- s
- The style to copy from.
Use the CopyFrom method to copy the style properties of a specified Style object into this instance of the DataGridPagerStyle class.
The following example demonstrates how to use the CopyFrom method to copy the properties of a Style object to 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;
// copy Style object to DataGridPagerStyle object.
myGrid.PagerStyle.CopyFrom ( 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
' copy Style object to DataGridPagerStyle object.
myGrid.PagerStyle.CopyFrom ( myStyle )
bindGrid ( )
End Sub |
|
C# |
VB |
DataGridPagerStyle Members MergeWith Reset