Home All Groups Group Topic Archive Search About

Databinding datagridview to textbox

Author
6 Aug 2006 8:47 AM
Scotty
Hi,

I am a beginner,

like to working with ado net
I have a datagridview

If i selecting a row in the datagrid i want to have returning the selected
data into a textbox "name" for example  "from the column "name"  "

Hope someone can help me

Thanks in advance
Marc

Author
7 Aug 2006 1:01 PM
Brian Tkatch
Scotty wrote:
Show quoteHide quote
> Hi,
>
> I am a beginner,
>
> like to working with ado net
> I have a datagridview
>
> If i selecting a row in the datagrid i want to have returning the selected
> data into a textbox "name" for example  "from the column "name"  "
>
> Hope someone can help me
>
> Thanks in advance
> Marc

Use DataBindings.

Something like:

textBox1.DataBindings.Add("Text", DataGridView.DataSource, "name")

B.
Author
7 Aug 2006 3:31 PM
Cor Ligthert [MVP]
Scotty,

Have a look at this sample,
http://www.vb-tips.com/dbpages.aspx?ID=5f4a0f68-a3b6-4fc8-8aff-587f730fa118

I hope this helps,

Cor


Show quoteHide quote
"Scotty" <xxx***@nothing.be> schreef in bericht
news:u9rNzTTuGHA.4460@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> I am a beginner,
>
> like to working with ado net
> I have a datagridview
>
> If i selecting a row in the datagrid i want to have returning the selected
> data into a textbox "name" for example  "from the column "name"  "
>
> Hope someone can help me
>
> Thanks in advance
> Marc
>