Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Datagrid

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
below is the code I'm using to populate a datagridview using a SP.

I want to be able to update my table once I press an update button.

cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "NAME"
cmd.Parameters.Add("@DOC", SqlDbType.VarChar).Value = Me.l8.Text.ToString

con.Open()

sda.Fill(dt)
dg1.DataSource = dt

I can't figure out how to update the grid.

any help would be appreciated.

Thanks

 

Add dg1.DataBind() right after dg1.DataSource = dt


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top