HighTechTalks DotNet Forums  

DataBinding Datagrid and TextBox

Dotnet Data Tools microsoft.public.dotnet.datatools


Discuss DataBinding Datagrid and TextBox in the Dotnet Data Tools forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Daniele Pinai
 
Posts: n/a

Default DataBinding Datagrid and TextBox - 09-26-2006 , 04:58 AM






Hi, I have a DataGrid (Griglia) an TextBox (Testo)
i had bound them with _Da (DataAdapter) _Ds (DataSet) e _CuMa
(CurrencyManager)

I click in a cell of DataGrid and i'd like to see in my TextBox the right
Value.
i had tried to do in this way

dim _NewCuma as
currencyManager=ctype(me.bindingContext(Griglia.Da taSource),CurrencyManager)

_Cuma.Position=_NewCuma.position

It 's right..if i don't change the order in the datagrid with a click on
the header...
if i do a click... the order change and the game is over :-(

Anyone can help me ??
can i found a metod for bind DataGrid and TextBox ...with Ordinable
Datagrid ??

Thank's and sorry for my bad english


Reply With Quote
  #2  
Old   
Daniele Pinai
 
Posts: n/a

Default RE: DataBinding Datagrid and TextBox - 09-27-2006 , 05:12 AM






I'd like my program works like in this row

Testo.DataBindings.Add("Text", Griglia.DataSource, "My_Field")

but i 'd like to do this a desing time... it's possible ?
Can my program work like this in other ways ???

Thank's


"Daniele Pinai" wrote:

Quote:
Hi, I have a DataGrid (Griglia) an TextBox (Testo)
i had bound them with _Da (DataAdapter) _Ds (DataSet) e _CuMa
(CurrencyManager)

I click in a cell of DataGrid and i'd like to see in my TextBox the right
Value.
i had tried to do in this way

dim _NewCuma as
currencyManager=ctype(me.bindingContext(Griglia.Da taSource),CurrencyManager)

_Cuma.Position=_NewCuma.position

It 's right..if i don't change the order in the datagrid with a click on
the header...
if i do a click... the order change and the game is over :-(

Anyone can help me ??
can i found a metod for bind DataGrid and TextBox ...with Ordinable
Datagrid ??

Thank's and sorry for my bad english


Reply With Quote
  #3  
Old   
Daniele Pinai
 
Posts: n/a

Default RE: DataBinding Datagrid and TextBox - 09-27-2006 , 06:46 AM



I had found the problem

visual studio write this rows

Me.Griglia.DataMember = ""
Me.Griglia.DataSource = Me._Ds_Teste1.Movimenti_Teste


the right rows are...

Me.Griglia.DataMember = "Movimenti_Teste"
Me.Griglia.DataSource = Me._Ds_Teste1

I hope this help anyone
"Daniele Pinai" wrote:

Quote:
I'd like my program works like in this row

Testo.DataBindings.Add("Text", Griglia.DataSource, "My_Field")

but i 'd like to do this a desing time... it's possible ?
Can my program work like this in other ways ???

Thank's


"Daniele Pinai" wrote:

Hi, I have a DataGrid (Griglia) an TextBox (Testo)
i had bound them with _Da (DataAdapter) _Ds (DataSet) e _CuMa
(CurrencyManager)

I click in a cell of DataGrid and i'd like to see in my TextBox the right
Value.
i had tried to do in this way

dim _NewCuma as
currencyManager=ctype(me.bindingContext(Griglia.Da taSource),CurrencyManager)

_Cuma.Position=_NewCuma.position

It 's right..if i don't change the order in the datagrid with a click on
the header...
if i do a click... the order change and the game is over :-(

Anyone can help me ??
can i found a metod for bind DataGrid and TextBox ...with Ordinable
Datagrid ??

Thank's and sorry for my bad english


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.