hi good day...
when user click a new form i want empty datagrid to display..
at here user can add new data and update into database..
i want the added data to be display in the new datagrid..
now my problm is i only can display empthy datagrid althoug user olredy add new data...
below are the coding of my code and also my attachement..please help me sir
Sub BindData()
Dim dsUser As New DataSet
UserConn.Open()
sqlCommand = New SqlCommand("Select * from [Material1 ]")
sqlCommand.Connection = UserConn
objDataAdapter = New SqlDataAdapter(sqlCommand)
objDataAdapter.Fill(dsUser)
dgEIA.DataSource = String.Empty
dgEIA.DataBind()
dgEIA.DataSource = dsUser
dgEIA.DataBind()
UserConn.Close()
End Sub
when user click a new form i want empty datagrid to display..
at here user can add new data and update into database..
i want the added data to be display in the new datagrid..
now my problm is i only can display empthy datagrid althoug user olredy add new data...
below are the coding of my code and also my attachement..please help me sir
Sub BindData()
Dim dsUser As New DataSet
UserConn.Open()
sqlCommand = New SqlCommand("Select * from [Material1 ]")
sqlCommand.Connection = UserConn
objDataAdapter = New SqlDataAdapter(sqlCommand)
objDataAdapter.Fill(dsUser)
dgEIA.DataSource = String.Empty
dgEIA.DataBind()
dgEIA.DataSource = dsUser
dgEIA.DataBind()
UserConn.Close()
End Sub