Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
selectedindex
- Page 1
"selectedIndex" issue
Programming
Web Development
15 Years Ago
by Zurompeta
…,Option); } if (id == "selected") { document.getElementById(fieldsArray[i]).
selectedIndex
= (j+1); } } } }[/CODE] So as you can see, if…']if (id == "selected") { document.getElementById(fieldsArray[i]).
selectedIndex
= (j+1); }[/CODE] In my case, there are 4 …
combobox SelectedIndex not working
Programming
Software Development
14 Years Ago
by drake10k
… = "Category"; cboxSubcategory.SetBinding(ItemsControl.ItemsSourceProperty, binding); cboxSubcategory.
SelectedIndex
= 0; } [/CODE] basically, I have two comboboxes and … The list is loaded correctly, but it remains on
SelectedIndex
-1. Anybody knows what I'm doing wrong? thank…
Re: Listbox change selectedindex value
Programming
Software Development
13 Years Ago
by NewUserVB.Net
… button1.click: dim L1SI as string = Listbox1.
selectedIndex
.ToString listbox1.item.
SelectedIndex
= L1SI - 1 button2.click: dim L1SI …as string = Listbox1.
selectedIndex
.ToString listbox1.item.
SelectedIndex
= L1SI + 1 If this doesn't … we have to change "listbox1.item.
SelectedIndex
"... post if you need for help …
Re: using ListBox SelectedIndex
Programming
Software Development
14 Years Ago
by Rogachev
…else return" statement after listBox2.
SelectedIndex
== 0. It means code …another structure: [CODE] if (listBox2.
SelectedIndex
== 0) { SelectedIndex0(); } else if (listBox2.
SelectedIndex
== 1) { SelectedIndex1(); } else…
Re: Binding DropDownList's SelectedIndex to 0 if value does not exist
Programming
Software Development
11 Years Ago
by Ketsuekiame
… not exist in the list of items he want the
selectedindex
= 0 or selectedvalue is "-- Select --". >… the database. > No data from database then, ComboBox1.
SelectedIndex
= 0; > Simple,am I right? I understood …> To deselect the currently selected item, set the
SelectedIndex
to -1. This unsets the selected item and invalidates …
using ListBox SelectedIndex
Programming
Software Development
14 Years Ago
by GAME
… the select index 0 executes. [code] #region SelectedIndex0 if (listBox2.
SelectedIndex
== 0) { SelectedIndex0(); } else { return; } #endregion #region SelectedIndex1 if (listBox2…
Re: Listbox change selectedindex value
Programming
Software Development
13 Years Ago
by codeorder
…toogleUpDown() End With End Sub Private Sub toogleUpDown() iT = lbMain.
SelectedIndex
: btnUp.Enabled = False : btnDown.Enabled = False '// lights…With lbMain sT = .SelectedItem '// get.Item Value. iM = .
SelectedIndex
'// get.Item Index and some. .Items.Remove(.SelectedItem) '// .Remove…
Re: Listbox.selectedindex will not return value
Programming
Software Development
13 Years Ago
by Reverend Jim
I know it's been solved, but to illustrate further, if you add the following after line 2 ~~~ vb If ListBox1.
SelectedIndex
= 0 Then ListBox1.RemoveAt(ListBox1.
SelectedIndex
) End If ~~~ then clicking on the first element in the list (index=0) will remove it.
Re: Binding DropDownList's SelectedIndex to 0 if value does not exist
Programming
Software Development
11 Years Ago
by Ferdinand_1
… not exist in the list of items he want the
selectedindex
= 0 or selectedvalue is "-- Select --".** So the best… from the database. 3. No data from database then, ComboBox1.
SelectedIndex
= 0; Simple,am I right?
Re: Different between SelectedValue, SelectedIndex and SelectedItem
Programming
Software Development
9 Years Ago
by Santanu.Das
….microsoft.com/en-us/library/system.web.ui.webcontrols.dropdownlist.
selectedindex
(v=vs.110).aspx](https://msdn.microsoft.com/en-us…/library/system.web.ui.webcontrols.dropdownlist.
selectedindex
(v=vs.110).aspx) [https://msdn.microsoft.com/en-us…
Dynamically write selectedIndex to a <dl> element
Programming
Web Development
19 Years Ago
by nataliemac
…"), then looping through to create an array of the
selectedIndex
for each select box, then using those values to create…
Listbox change selectedindex value
Programming
Software Development
13 Years Ago
by markdean.expres
… one level down. I have been trying to manipulate the
selectedindex
property but it isn't working. Can anyone help? Thanks
Re: Listbox change selectedindex value
Programming
Software Development
13 Years Ago
by codeorder
Not really, though close. [CODE] With ListBox1 If Not .
SelectedIndex
= -1 Then '// if .item selected. Dim L1SI As String = .SelectedItem '// run code here for up/down. .SelectedItem = L1SI End If End With[/CODE]
Listbox.selectedindex will not return value
Programming
Software Development
13 Years Ago
by Gé48
I have a listbox that contains numbers that vary from 0 to 99. My problem is when the number in the listbox is 0, listbox1.
selectedindex
will not return a value. So I cannot use removeat(x) which works for all other numbers. Can anyone give me an idea on how to do it ?
Re: Listbox.selectedindex will not return value
Programming
Software Development
13 Years Ago
by Reverend Jim
Post your code. When I used the following code it worked fine. ~~~ vb Private Sub ListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListBox1.SelectedIndexChanged TextBox1.Text = ListBox1.
SelectedIndex
End Sub ~~~
Binding DropDownList's SelectedIndex to 0 if value does not exist
Programming
Software Development
11 Years Ago
by </scorpion>
… not exist in the list of items i want the
selectedindex
is 0 or selectedvalue is "-- Select --". pls. help…
Re: Binding DropDownList's SelectedIndex to 0 if value does not exist
Programming
Software Development
11 Years Ago
by Ferdinand_1
Before fetching a data from the database do this: ComboBox1.Items.Add("-- Select --"); And lastly, if there's no data on the database do this: ComboBox1.
SelectedIndex
= 0;
Re: Binding DropDownList's SelectedIndex to 0 if value does not exist
Programming
Software Development
11 Years Ago
by Ketsuekiame
Set your combobox `Text` property to the default value you want to display. If the selected index doesn't exist in the DB, set your `
SelectedIndex
` on the combo box to -1. This will revert it to your default text.
Re: Binding DropDownList's SelectedIndex to 0 if value does not exist
Programming
Software Development
11 Years Ago
by Mike Askew
… selected index doesn't exist in the DB, set your
SelectedIndex
on the combo box to -1. This will revert it…
Vb 2012 Express Listview SelectedIndex no where to be seen xD
Programming
Software Development
11 Years Ago
by VB 2012
lol Hi people its been 2 years im back :D I finshed high school but had too stop programming so im back to noob The problem is i cant seem to find
SelectedIndex
while using listview -__- I really dont want to use text to find a item :/
Re: Binding DropDownList's SelectedIndex to 0 if value does not exist
Programming
Software Development
11 Years Ago
by </scorpion>
thanks to all of you. i've already got the answer. i used rowdatabound in gridview to show the selectedvalue or
selectedindex
=0/select in dropdownlist . :D
Getting values from Items in Listbox using listBox1.SelectedIndex
Programming
Software Development
10 Years Ago
by Joemeister
…(object sender, EventArgs e) { //Racenumber in textbox textBox3.Text = listBox1.
SelectedIndex
.ToString(); //Name in textbox //Not working?? :( textBox5.Text = listBox1.SelectedItem…
Different between SelectedValue, SelectedIndex and SelectedItem
Programming
Software Development
9 Years Ago
by nimz143
Hi I would like to ask. I have one dropdown list control. What are the different between this 3 in dropdown list. 1. Dropdownlist.SelectedValue 2. Dropdownlist.
SelectedIndex
3. Dropdownlist.SelectedItem Thank you :)
Re: "selectedIndex" issue
Programming
Web Development
15 Years Ago
by Zurompeta
It figures that I figure it out AFTER I ask for help :P
Re: combobox SelectedIndex not working
Programming
Software Development
14 Years Ago
by zinnqu
Yes, its too complicated for the idea that you want. You cant treat the xml data like any other data that is used in c#. try something like this [CODE] DataSet dsSet = new DataSet(); dsSet.ReadXml(Application.StartupPath + "\\agriculture.xml"); comboBox1.DataSource = dsSet.Tables["agriculture"];…
Re: Dynamically write selectedIndex to a <dl> element
Programming
Web Development
19 Years Ago
by alpha_foobar
It sounds like you've got it almost there. A node has several methods that can be called to manipulate child nodes. To remove a child call you would do something like this: parentNode.removeChild(childNode); Here are some references that you will find useful: [url]http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-1950641247[/url] […
Re: Listbox change selectedindex value
Programming
Software Development
13 Years Ago
by codeorder
What exactly is the issue? .moving the items up/down? .or selecting the previously selected.Item with a new Index?
Re: Listbox change selectedindex value
Programming
Software Development
13 Years Ago
by NewUserVB.Net
he wants to scroll up down the listbox i think....
Re: Listbox change selectedindex value
Programming
Software Development
13 Years Ago
by codeorder
Thanks for input [B]NewUserVB.Net[/B], though I'll wait for the o.p's(original.poster's) input on this; only makes sense Not to go way out of my way, when I possibly only have to walk a few steps Then be back on my original.path.:)
Re: Listbox change selectedindex value
Programming
Software Development
13 Years Ago
by NewUserVB.Net
Oke... :-) but is correct the code that I posted?
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC