In HTML DOM, the selectedIndex property sets or returns the index of the selected option in a dropdown list. The index starts at 0.
Questions tagged [selectedindex]
354 questions
0
votes
1 answer
WP7 listpicker selectionchanged selectedindex return -1
I have i little and simple problem. I think.
I have to Listpickers where the second depends on the selection from the first.
I've thought that i could easily be done with use of selectionchanged on the first Listpicker and then get the selected…

freddy
- 394
- 1
- 5
- 19
0
votes
0 answers
DataGrid SelectedIndex Changed Event Handler
I have a WPF DataGrid which I'm trying to auto-scroll using this code:
private void mydatagrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
mydatagrid.ScrollIntoView(mydatagrid.CurrentItem);
}
The problem I'm having is that…

BCA
- 7,776
- 3
- 38
- 53
0
votes
1 answer
listbox1.SelectedIndex (arguement out of range exception) c#/.net
I am trying to browse web pag1es using a listbox, I have added three links to it. All three links are loading well but when third link finishes loading I got this exception.
Exception is:
InvelidArguement = value of '3' is not valid for…

user1563019
- 69
- 1
- 2
- 8
0
votes
3 answers
Binding the SelectedIndex (Combobox) are not working from codebehind file
I have a window with a combobox. This comboboxhas 5 ComboboxItems.
I binding the SelectedItem (combobox) to the ComboBoxSelectedIndex Property in my code behind file.
In the example I want that it is not possible to select the items 4 and 5.
But i…

David
- 4,027
- 10
- 50
- 102
0
votes
1 answer
this keyword with select box onchange attribute in Safaari vs. Chrome, Firefox, IE
Tested in Chrome 20, FF 13, IE 9, Safari 5.1.7.
Can anyone tell me why the following code works in Chrome, Firefox and IE, but not in Safari?
0
votes
1 answer
Advantage to using the this keyword with selectedIndex?
Is there any advantage to this:
document.getElementById('mySelectBox').options[this.selectedIndex].value
over this:
document.getElementById('mySelectBox').options[selectedIndex].value
Just curious. Thanks!

JulianJohannesen
- 346
- 3
- 11
0
votes
3 answers
Change the selectedIndex in a combo box according to data loaded from a database (PHP)
I have a database of Employees and a dropdown list which I generated with PHP, then with javascript I tried to put the right type of blood of each employee in the database.
I have a database of Employees and a dropdown list which I generated with…

Aikanáro
- 867
- 3
- 20
- 42
0
votes
1 answer
Keeping selected item selected in gridview problems
I am trying to keep the selected item (datakey) in a gridview selected after any operation, such as sorting. I have code that is keeping it selected, but sometimes the item's last position (index before it was sorted) remains selected, along with…

Ryan
- 17,511
- 23
- 63
- 88
0
votes
1 answer
asp.net usercontrol dropdown selectedindex and selectedvalue empty
im coding a new usercontrol a dropdown my code is
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="StylishDDL.ascx.cs" Inherits="JDropDown.Controls_StylishDDL" %>