display new datagrid

Joined
Sep 18, 2007
Messages
3
Reaction score
0
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
 

Attachments

  • untitled.JPG
    untitled.JPG
    108.1 KB · Views: 163

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,301
Latest member
BuyPureganics

Latest Threads

Top