Function CreateBoundColumn(ByVal DataFieldValue As String, ByVal HeaderTextValue As String) As BoundColumn
' This version of CreateBoundColumn method sets only the ' DataField and HeaderText properties.
' Create a BoundColumn. Dim column As BoundColumn = New BoundColumn()
' Set the properties of the BoundColumn. column.DataField = DataFieldValue column.HeaderText = HeaderTextValue
Return column
End Function
Function CreateBoundColumn(ByVal DataFieldValue As String, _ ByVal HeaderTextValue As String, ByVal FormatValue As String, _ ByVal AlignValue As HorizontalAlign) As BoundColumn
' This version of CreateBoundColumn method sets the DataField, ' HeaderText, and DataFormatString properties. It also sets the ' HorizontalAlign property of the ItemStyle property of the column.
' Create a BoundColumn using the overloaded CreateBoundColumn method. Dim column As BoundColumn = CreateBoundColumn(DataFieldValue, HeaderTextValue)
' Set the properties of the BoundColumn. column.DataFormatString = FormatValue column.ItemStyle.HorizontalAlign = AlignValue
Return column
End Function
Function CreateLinkColumn(ByVal NavUrlValue As String, ByVal TargetValue As String, _ ByVal TextValue As String, ByVal HeaderTextValue As String) As HyperLinkColumn
' Create a BoundColumn. Dim column As HyperLinkColumn = New HyperLinkColumn()
' Set the properties of the ButtonColumn. column.NavigateUrl = NavUrlValue column.Target = TargetValue column.Text = TextValue column.HeaderText = HeaderTextValue
Return column
End Function
2008年1月27日 星期日
訂閱:
文章 (Atom)