I write this code :
MyCombo.Selecte dIndex = MyCombo.Items.I ndexOf ("MyString")
this line return -1 as the index value ( it means MyString is not found)
"MyString" exists in the items list. MyCombo is filled with the following code :
MyCombo.DataSou rce = MyDataSet.table s
MyCombo.Display Member = "...."
MyCombo.ValueMe mber = "...."...
Search Result
Collapse
4 results in 0.0040 seconds.
Keywords
Members
Tags
-
Dropdown lists in gridviews on selected index changed.
Hi
Is it possible to change the data source of a dropdown list in a gridview from another dropdown list selected index changed method in the same gridview?
for example I have a dropdown that needs to change its contents depending on what is chosen in the previous cell of the gridview, which is also a dropdown list.
Any Help would be much appreciated
Thanks -
Getting the selected value of a select input
All,
I'm having a little trouble getting the value of a select in my html form. I want a list of dates in a dropdown and when the user clicks on refresh it should do the appropriate action. But when I run in IE7, it comes up with the selectedIndex being undefined.
In my HTML body, I have the select and standard button:
Code:<body id="example" onload="displayXML();"> <div
-
Value of '0' is not valid for 'SelectedIndex'
To reproduce, run the code.
Observed:
System.Argument OutOfRangeExcep tion was unhandled
Message="Invali dArgument=Value of '0' is not valid for
'SelectedIndex' .\r\nParameter name: SelectedIndex"
t2.c1 contains legal value.
Why this error occurs ?
How to fix ?
Andrus.
using System.Windows. Forms;
using System.Data;
using System;
class...