DataGrid风格样式:FooterStyle,HeaderStyle,PagerStyle,SelectedItemStyle,ItemStyle
本文导语: asp.net中datagrid有多种风格样式,可自由设置。 它们分别是:FooterStyle,HeaderStyle,PagerStyle,SelectedItemStyle,ItemStyle。 代码: 代码示例: Function AllDiscs() As System.Data.SqlClient.SqlDataReader Dim connectionString As String = "server=...
asp.net中datagrid有多种风格样式,可自由设置。
它们分别是:FooterStyle,HeaderStyle,PagerStyle,SelectedItemStyle,ItemStyle。
代码:
Function AllDiscs() As System.Data.SqlClient.SqlDataReader
Dim connectionString As String = "server='(local)NetSDK'; trusted_connection=true; Database='CAM'"
Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT * FROM Employee"
Dim sqlCommand As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(queryString, sqlConnection)
sqlConnection.Open
Dim dataReader As System.Data.SqlClient.SqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Return dataReader
End Function
Sub Page_Load(sender As Object, e As EventArgs)
DataGrid1.DataBind()
End Sub
您可能感兴趣的文章:
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。