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
3 answers

SelectedIndexChanged doesn't work!

My code: *.aspx: *.aspx.cs: protected void Page_Load(object sender, EventArgs e) { …
roman
  • 199
  • 2
  • 2
  • 9
3
votes
4 answers

Why DropDownList.SelectedIndexChanged event does not fire?

I have a DropDown which is bounded to an ObjectDataSource. On its data bound event, I am adding "--select--" value on the 0 index. I have a LinkButton on the page and on its client click, i am selecting different item on drop down (using…
Jeevan Bhatt
  • 5,881
  • 18
  • 54
  • 82
3
votes
2 answers

How can I access the value of the selected item in a dropdown?

I've got this code which works to populate a second dropdownlist based on what's in the first one (in the page's Page_Init event): Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load . . . 'Populate…
3
votes
3 answers

ListBox.SelectedIndexChanged - can you determine if it was user initiated?

My question is similar to this: How to prevent ListBox.SelectedIndexChanged event?, but I want to ask it a different way. Is there a simple way to determine if the 'SelectedIndexChanged' is coming from the user as opposed to initiated through code…
JustLooking
  • 2,405
  • 4
  • 28
  • 38
3
votes
1 answer

Dropdown OnSelectedIndexChanged not firing

The OnSelectedIndexChanged event is not firing for my dropdown box. All forums I have looked at told me to add the AutoPostBack="true", but that didn't change the results. HTML: …
Jim
  • 3,425
  • 9
  • 32
  • 49
3
votes
0 answers

Dropdownlist SelectedIndexChanged fired during page load resets item selected

I have an asp.net c# page that shows a list of organisations and also provides via text fields the 'type of organisation' and its address. I originally had the code working whereby selecting an organisation would fire the SelectedIndexChanged event…
Sam
  • 169
  • 1
  • 1
  • 10
3
votes
6 answers

Asp.NET dropdownlist in usercontrol not firing SelectedIndexChanged event

Asp.Net 2.0 framewrok - VB.Net application I have a UserControl containing a Asp.Net DropDownList. Things already researched and \ or tried: The control gets bound to data on page load inside if not Page.IsPostBack (only loads once) ID proprety is…
Jim Evans
  • 6,285
  • 10
  • 37
  • 60
3
votes
2 answers

DropDownList SelectedIndexChanged event not firing within GridView HeaderTemplate

I am working on a job board website and specifically the job search page at the moment. I am returning the jobs found into a DataBound GridView (namely gvwJobs), and within the HeaderTemplate I have a DropDownList named ddlSortDirection which…
Adam Sharif
  • 31
  • 1
  • 2
3
votes
4 answers

How to prevent scrollbars from resetting on selectedindexchanged for gridview

I have a gridview on my page which is shown below
Win
  • 2,593
  • 3
  • 25
  • 35
3
votes
3 answers

C# Combo Box SelectedValue Null

Without posting the entirety of my code (I'm just posting the offending script), I'm having a problem that seems like lots of people have had but mine seems to not respond to other recommended fixes. I'm using C# in VS2008. Basically I have a…
3
votes
1 answer

Listbox always returns wrong value of selected item

I've got a listbox in C# that's dynamically filled. I've got a problem with the selectedindex_changed of the listbox. Everytime it gives the value of the last item in the listbox and not the one I selected. I've got that same problem with a combobox…
Lewis
  • 225
  • 1
  • 6
  • 18
3
votes
2 answers

Changing the chart type in ASP.net when in a DropDownList SelectedIndex Changed event

I have a DropDownList and a chart created in ASP.net.The existing items of it are bar chart and pie chart. I need to select my chart in to the format which is selected in the DropDownList. Is there any possible way to do this??Thank you in…
Dinithi De Silva
  • 1,142
  • 5
  • 28
  • 46
3
votes
0 answers

DropDownList within repeater does async postback but doesn't fire SelectedIndexChange event

So I have exhausted all the help on this I can find, but am still stumped. I have a DDL within a repeater, that I need to Async postback and update an updatepanel also within the same repeater:
Ben Drury
  • 1,356
  • 2
  • 16
  • 34
3
votes
2 answers

Binding RowCommand to fire when any cell in a row is clicked

My GridView basically displays a summarized version of data in the database. What I want to do is set it up so that when you click anywhere in a row in the GridView, it should execute a set procedure that'll hide the panel that contains the GridView…
Ortund
  • 8,095
  • 18
  • 71
  • 139
3
votes
3 answers

Display dropdown selected item in URL of the website

I am working on a single page asp.net application(webform) with 4 dropdowns. Please take this example http://ifsccode.in I need the same functionality in my website.The coding part is done.Everything is working fine but I want to display the…
1 2
3
20 21