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 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
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?
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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....
|
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...
|
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...
|
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...
|
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...
|
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:...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
| |