473,473 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combobox.SelectedValue | ArgumentOutOfRangeException

Hi people,

There seems to be a peculiar problem that I just encountered. There is a
combobox that has a datatable as a datasource with 2 different columns bound
to Display and value members. When i try and set a selected value to this
combobox, and this value happens to be the 2nd row in the datatable, I'm
getting an ArgumentOutOfRangeException. Please note that this value is part
of the datatable very much. Also, apart from the 2nd row, all other rows'
data gets selected alright.

Oddly enough this seems to be a problem other people have also been facing.
On googling, I came across at least 2 instances of it:

http://www.dotnet247.com/247referenc...29/148674.aspx
http://www.dotnet247.com/247referenc...29/148796.aspx

Please note that I cannot use the .SelectedIndex property, as this data is
generated at runtime and i need to populate the combo with the corresponding
value and display. I would not be in a position to know the index.

Cheers!
Nick

Jan 17 '06 #1
0 1003

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

Similar topics

1
by: chen qi | last post by:
## i have a table like this: myID myName ------------------------ ----------------------------- 1 aaa 2 bbb 3 ...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
0
by: randy.buchholz | last post by:
I am trying to trap the following error. I have tried to catch it on page load and every event on the data source and dd. No luck. I'm forcing the error by setting the dd.text to an invalid value...
11
Frinavale
by: Frinavale | last post by:
This question is going to sound a little crazy but.........How do you set the selected item in a ComboBox? I am populating a ComboBox with a bunch of instances of a custom private class: For...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.