Questions tagged [selectedindexchanged]

A Microsoft .NET Framework event which occurs when the SelectedIndex property has changed.

A Microsoft .NET Framework event which occurs when the SelectedIndex property has changed.

The event can be raised from ComboBox, GridView, ListControl and ListBox objects.

http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.selectedindexchanged(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedindexchanged(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listcontrol.selectedindexchanged(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.selectedindexchanged(v=vs.110).aspx

305 questions
217
votes
8 answers

DropDownList's SelectedIndexChanged event not firing

I have a DropDownList object in my web page. When I click on it and select a different value, nothing happens, even though I have a function wired up to the SelectedIndexChanged event. First, the actual object's HTML code:
gcode
  • 2,954
  • 4
  • 21
  • 32
47
votes
7 answers

Getting selected value of a combobox

public class ComboboxItem { public string Text { get; set; } public string Value { get; set; } public override string ToString() { return Text; } } private void comboBox1_SelectedIndexChanged(object…
maxy
  • 473
  • 1
  • 4
  • 4
29
votes
5 answers

How to implement full row selecting in GridView without select button?

I'm implementing a feature that when the user press on any point in the row in a GridView the row will be selected instead of Select button. To implement that, I'm using the following code: protected void GridView1_RowDataBound(object sender,…
Homam
  • 23,263
  • 32
  • 111
  • 187
17
votes
15 answers

How to avoid thousands of needless ListView.SelectedIndexChanged events?

If a user select all items in a .NET 2.0 ListView, the ListView will fire a SelectedIndexChanged event for every item, rather than firing an event to indicate that the selection has changed. If the user then clicks to select just one item in the…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
11
votes
5 answers

ASP.NET / C#: DropDownList SelectedIndexChanged in server control not firing

I'm creating a server control that basically binds two dropdown lists, one for country and one for state, and updates the state dropdown on the country's selectedindexchanged event. However, it's not posting back. Any ideas why? Bonus points for…
9
votes
2 answers

Why does the SelectedIndexChanged event fire in a ListBox when the selected item is modified?

We are given a Windows Form Application created from Microsoft Visual Studio's template (designer code on PasteBin 1 2 3 4) with a default ListBox exampleListBox and Button exampleButton. We populate the ListBox with numbers from 1 to 10. for (int i…
Zsw
  • 3,920
  • 4
  • 29
  • 43
8
votes
3 answers

Dropdownlist selected value at Selectedindexchanged event

I'm working on asp.net website with Vb.net and I have a dropdownlist with autopostback = true and I need to get the selected value when I change the item or I want to get the item which fires the selectedindexchanged event .. any help please..
Amr Elnashar
  • 1,739
  • 12
  • 33
  • 53
8
votes
4 answers

"SelectedIndexChanged" not firing after "Items.Clear()" in ListBox

For a ListBox (With Selection mode set to One), I wish to track whether there's a selected item or none selected. To do so, I subscribed a method to SelectedIndexChanged and checked if the SelectedIndex is -1 or not. However, I noticed that the…
7
votes
3 answers

asp dropdownlist postback not working in update panel when using url in masterpage

I am using, in my master page for base url, now when I am using dropdownlist control on content page (located in localhost:80/directory1/directory2) within update panel, selectedindexchanged event is not…
6
votes
2 answers

DropDownList OnSelectedIndexChange to 0th index w/out ViewState

I did follow the article TRULLY Understanding ViewState (great article btw) and populating my drop down list is working great. I've even setup a OnSelectedIndexChange event which fires almost as great. The problem I've found is the…
6
votes
4 answers

ListView SelectedIndexChanged Event no Selected Items problem

I have a small C# 3.5 WinForms app I am working on that grabs the event log names from a server into a listview. When one of those items is selected, another listview is populated with the event log entries from the selected event log using the…
Christopher
  • 412
  • 2
  • 7
  • 13
6
votes
5 answers

OnSelectedIndexChanged event of RadioButtonList is not firing

I have a RadioButtonList in asp.net. I am trying to do a simple thing i.e. to display or hide a div on changing the radio buttons from the list.But the event OnSelectedIndexChanged is not firing. I am not getting the reason. This is the…
samiaj
  • 421
  • 1
  • 5
  • 15
6
votes
5 answers

ASP.Net AJAX UpdatePanel Fails to Trigger SelectedIndexChanged Event

I have an ASP.Net RadioButtonList control with AutoPostBack set to true. I also have an OnSelectedIndexChanged function that is called whenever a user changes the selection. Finally, the user is required to provide the information requested for this…
5
votes
2 answers

DropDownList SelectedIndexChanged within Gridview not firing!

I have been looking for a solution to this for a while though and seen many posts that show me how to do it but yet I cannot get my SelectedIndexChanged event to fire when the DropDownList is changed. The DropDownList AutoPostBack is set to True,…
Jammer
  • 2,330
  • 11
  • 48
  • 77
5
votes
2 answers

Recognize CheckedListBox item has been selected

I've never dealt with checkedListBox1 until now. A program that I want to make will benefit from using it rather than having to use numerous Checkboxes. I have the code: private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs…
Pichu
  • 265
  • 2
  • 4
  • 9
1
2 3
20 21