combo box selectedvalue error

  • Thread starter Thread starter AH
  • Start date Start date
A

AH

hi everyone,

when binding a datatable or even dataview to combo box
(win form), I occassionally will encounter the problem of
the selectedvalue (read from the selectedindexchanged
event) as of type "system.data.dataRowView", could anyone
out there advise what caused this problem and what is the
remedy for it?

Thank you,

Albert
 
HI AH,

Mostly that is because the selected index change event is firing everytime
there is a change in the combobox.

You can prevent that by setting a switch/bool/flag while initializing.

I hope this helps?

Cor
 
Probably because you have not set the display member to the column you need
to display. As a default the display member will call the tostring()
memberFunction of the DataRow which will simply return the class Type of
"system.data.dataRowView".

Regards - OHM



hi everyone,

when binding a datatable or even dataview to combo box
(win form), I occassionally will encounter the problem of
the selectedvalue (read from the selectedindexchanged
event) as of type "system.data.dataRowView", could anyone
out there advise what caused this problem and what is the
remedy for it?

Thank you,

Albert

Regards - OHM# OneHandedMan{at}BTInternet{dot}com
 
Hi OHM

Good morning,

To you also: I did make an answer to Joe Nuk me
It is in a thread Close vs Dispose.

I do not know if you speak more languages than English, but those words I
use means woman in French, Dutch, German, Italian, Polish and Portugese,
have a look at it?

I am not sure if I understand the answer from Joe

(My anser is with "Have Fun")

:-))

Cor
 
Hi Cor,

;-)

OHM
Hi OHM

Good morning,

To you also: I did make an answer to Joe Nuk me
It is in a thread Close vs Dispose.

I do not know if you speak more languages than English, but those
words I use means woman in French, Dutch, German, Italian, Polish and
Portugese, have a look at it?

I am not sure if I understand the answer from Joe

(My anser is with "Have Fun")

:-))

Cor

Regards - OHM# OneHandedMan{at}BTInternet{dot}com
 
Back
Top