-
Nov 29th, 2012, 01:57 AM
#1
Thread Starter
Member
how do i send data from datagrid to textbox
i have a datagrid and i am not sure which event to use or how to use it. I want a situation whereby a user clicks or selects an item and it shows in a textbox then i have a button that will delete that item from the database
-
Nov 29th, 2012, 02:02 AM
#2
Re: how do i send data from datagrid to textbox
you mean a datagridview + not a datagrid right?
they're 2 different controls.
anyway, how is your dgv bound to a datasource?
do you already have the code for deleting the row?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Nov 29th, 2012, 02:15 AM
#3
Thread Starter
Member
Re: how do i send data from datagrid to textbox
Its a datagrid view and this is how i am populating and binding the grid to datasource from the dbase
Dim da As SqlDataAdapter
ds = New DataSet
Dim cmd As New SqlCommand
cmd.CommandType = CommandType.Text
cmd.Connection = General.dbConnection
'Get Stock Items
cmd.CommandText = "Select * From _Zones"
da = New SqlDataAdapter(cmd)
da.Fill(ds, "Zones")
dgZones.DataSource = ds.Tables("Zones")
and i do not have the code to delete the selected item
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|