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
3
votes
1 answer

Listbox Returns Empty String on SelectedIndexChanged Event

The above error occurs on a SelectedIndexChanged click event on a listbox. in debug the value returned is "", however when you look at the webpage source code there are definitely values. Here's my listbox:
ComfortablyNumb
  • 1,448
  • 10
  • 37
  • 64
3
votes
1 answer

How to handle SelectionChanged event in via delegate command when the combobox is in a ListView cell

"WPF command support in ComboBox", this page shows how to extend a combobox to support a command, but it didn't give a dome of the delegate command that maps to the combobox's SelectedIndexChanged event. Now the problem I face is how can I handle…
夏夜流萤
  • 41
  • 1
  • 9
2
votes
2 answers

Getting SelectedIndexChanged event of checkboxlist using javascript

I have a checkboxlist control in one of the web application. I want to use javascript to handle the SelectedIndexChanged event. The checkbox list is like One
MithunRaj
  • 103
  • 4
  • 12
2
votes
2 answers

Prevent bypassing SelectedIndexChanged in ComboBox

I was surprised, that SelectedIndexChanged on a ComboBox with ComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList can be bypassed by changing the shown value to another one. Here are steps to reproduce the case: Create a Form…
Rekshino
  • 6,954
  • 2
  • 19
  • 44
2
votes
2 answers

How to get selected item in ASP.NET GridView

How can I get the selected item on the SelectedIndexChanging handler when using two SelectCommands? I can get the selected row through e.SelectedRow but I'm unable to get the selected column. It's correct to have more than one SelectCommand in a…
Diogo Cardoso
  • 21,637
  • 26
  • 100
  • 138
2
votes
3 answers

Dropdownlist in a repeater, selected index changed not working

I have a repeater with a dropdownlist in it. When a user changes its index, I would like a label to change its value. (the ddlSizes values come from a MySQL DB) Sizes.aspx
CustomX
  • 9,948
  • 30
  • 85
  • 115
2
votes
1 answer

Add event in SP2010

how to add SelectedIndexChanged event for DropDownList in SharePoint2010?
roman
  • 199
  • 2
  • 2
  • 9
2
votes
2 answers

Using IWindowsFormsEditorService on property tree for dropdown doesn't close

So I have a set up like the answer for this post: display list of custom objects as a drop-down in the PropertiesGrid , where I have a property tree and I need one of them to have a dropdown which I fill from a string array. Im using…
2
votes
3 answers

Best way to simulate 'SelectedIndexChanged' for ASP.NET DropDownList control with ViewState disabled

I've found many posts where people try to work around the problem of SelectedIndexChanged not working when EnableViewState='false'. Im a little confused why control state doesnt kick in and allow it to work, but thats bonus points if anyone can…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
2
votes
7 answers

Blank Gridview Cell populates " " into textbox

I've noticed that when i populate textboxes from a selected row in a gridview that if the field is blank it displays " " in the textbox. Here is the solution I came up with. I check each cell before adding it to the textbox. I get the feeling…
Joshua Slocum
  • 21
  • 1
  • 1
  • 3
2
votes
3 answers

How to prevent a ComboBox from firing another ComboBox's SelectedIndexChanged event when filling it

So, basically I'm using a ComboBox.SelectedIndexChanged event to fill 5 more ComboBoxs wich each have their own SelectedIndexChanged event as well. The problem is that when the first SelectedIndexChanged event fires to fill the rest.. it also fires…
2
votes
2 answers

C# Dropdownlist OnSelectedIndexChanged not firing

I have an issue with both Dropdownlist_OnSelectedIndexChanged and Checkbox_OnCheckedChanged events not firing from within an UpdatePanel after the UpdatePanel has been updated from the code behind. As you can see from the code below the DropDownList…
neilrudds
  • 205
  • 1
  • 6
  • 19
2
votes
2 answers

Enabled and disabled combobox after index change

I'm developing a software and I have a little trouble. I have two combobox, the first one fills the second one but if the first combobox has a value which is equal than -1, then the second combobox is not enable. This is a peace of my code: private…
LordCommanDev
  • 922
  • 12
  • 38
2
votes
1 answer

Why is this code not disabling my button after it has been enabled?

I've got a button on a Windows Form that starts off disabled (Enabled = false). I want to enable it when the user has selected an item from a combobox, and checked at least one item from a CheckedListBox. The user can check/uncheck all the items in…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
2
votes
1 answer

C# using SelectedIndexChanged via Combo Box to change a label with text from a text file

In the combo box I can get it to load all the conversions to the combo box. But, when I click a conversion from the combo box it changes the data to null for some reason. I am not sure if anyone can help me without looking at all my code. But I…