473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

combo box selectedvalue error

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

Nov 20 '05 #1
4 4137
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


AH wrote:
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
Nov 20 '05 #2
Cor
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
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?

Nov 20 '05 #3
Cor
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
Nov 20 '05 #4
Hi Cor,

;-)

OHM

Cor wrote:
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
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mr_burns | last post by:
hi, using javascript, how do i select an option in a combo box? i have tried looking on the internet but dont really know what i should be searching for. what i want to happen is that when a...
16
by: Mike L | last post by:
This is for a Win form. My combo box DropDownStyle is set to simple. When the user types in a 3 character string in the combo box, the closest item in the collection is shown, right below where...
4
by: briandh | last post by:
Hi I have a web form, using vb.net code behind, with a combo box populated with a dataset (Name, ID). What I have found, unlike a windows form, is that if I try to pass a value (ID) into the...
1
by: Young J. Putt | last post by:
I have what I thought was a relatively simple data situation that I can't seem to get working using ADO.NET datasets and data binding. I have an "Issues" table which records the UserID of the user...
1
by: James | last post by:
I am used to VB6 but need to develop something in .Net. I need to create several bound combo-boxes which will use lookup tables to get their values. I created a form using the dataform wizard....
2
by: Nikolay Petrov | last post by:
I have asked a question before some time, and a guy responded to it. His answer raised new questions and I replied them back, but still no answer. I need them urgently so I am to post the whole...
6
by: Jean Christophe Avard | last post by:
Hi! I'm designing an application that produces invoices. I have a combobox that is populated with the Name of every client in the database. What I would like to do is to have the combobox to...
4
by: Mark L. Breen | last post by:
Hello Guys and Galls, I use combos on my forms. The code to initialise the combos is as follows Dim dsPIDTypes As DataSet dsPIDTypes = PartDB.GetPIDTypes ' Returns a dataset object...
9
by: Kay | last post by:
Hi all, Could you tell me the best way to add a blank item(as first item) in a data binded combo box? Because I think I didn't do it right and it generate an error if the second item(after the...
3
by: Bill | last post by:
I have what I think should be a simple question regarding a bound combo box. My first table is Dealers: DealerID - primary key DealerName BillToLocation My second table is Locations:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.