2
276q
Trying to use the sortcommand in my datagrid, the subroutine
"Sort_Grid" error message is prompting: Name 'objDataView' is not
declared.
'''''''''
Sub bindSwGrid()
Dim strSQL As String = "SELECT * FROM cards"
Dim objConnection As New SQLConnection(strConnection)
Dim objAdapter As New SQLDataAdapter(strSQL,
objConnection)
Dim objDataSet As New DataSet()
objAdapter.Fill(objDataSet, "cards")
Dim objDataView As New
DataView(objDataSet.Tables("cards"))
swGrid.DataSource = objDataView
swGrid.DataBind()
End Sub
Sub Sort_Grid(sender As Object, e As DataGridSortCommandEventArgs)
objDataView.Sort = e.SortExpression
swGrid.DataBind()
End Sub
''''''''''
??
Ed
"Sort_Grid" error message is prompting: Name 'objDataView' is not
declared.
'''''''''
Sub bindSwGrid()
Dim strSQL As String = "SELECT * FROM cards"
Dim objConnection As New SQLConnection(strConnection)
Dim objAdapter As New SQLDataAdapter(strSQL,
objConnection)
Dim objDataSet As New DataSet()
objAdapter.Fill(objDataSet, "cards")
Dim objDataView As New
DataView(objDataSet.Tables("cards"))
swGrid.DataSource = objDataView
swGrid.DataBind()
End Sub
Sub Sort_Grid(sender As Object, e As DataGridSortCommandEventArgs)
objDataView.Sort = e.SortExpression
swGrid.DataBind()
End Sub
''''''''''
??
Ed