6 Replies - 404 Views - Last Post: 21 March 2019 - 06:25 AM Rate Topic: -----

#1 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 110
  • Joined: 16-January 13

Make dropdown list in winform having auto post feature like in asp.net

Posted 20 March 2019 - 05:39 AM

Dropdown list in asp.net app can set autopost=true.
How to make this function working for dropdown list in winform?
Doing so, once user select a value from dropdown list will fire code to do something.
Is This A Good Question/Topic? 0
  • +

Replies To: Make dropdown list in winform having auto post feature like in asp.net

#2 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 210
  • View blog
  • Posts: 1,190
  • Joined: 05-December 13

Re: Make dropdown list in winform having auto post feature like in asp.net

Posted 20 March 2019 - 05:51 AM

Autopost doesn't exist, and so you need to use SelectedIndexChanged event from the combobox. See https://docs.microso...framework-4.7.2
Was This Post Helpful? 1
  • +
  • -

#3 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14929
  • View blog
  • Posts: 59,621
  • Joined: 12-June 08

Re: Make dropdown list in winform having auto post feature like in asp.net

Posted 20 March 2019 - 07:28 AM

You can see aaaaaaalllllllll the events for a given UI control by the following.

  • in the designer.
  • right click on the control
  • go to properties
  • in the properties pane that comes up click the lightening bolt

Boom! All those are available!
Was This Post Helpful? 2
  • +
  • -

#4 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 210
  • View blog
  • Posts: 1,190
  • Joined: 05-December 13

Re: Make dropdown list in winform having auto post feature like in asp.net

Posted 20 March 2019 - 09:28 AM

Perhaps this gif will help you understand what Modi is pointing you towards. Once you see what events are available, you can look it up on MSDN or just ask us.
Posted Image
Was This Post Helpful? 1
  • +
  • -

#5 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 110
  • Joined: 16-January 13

Re: Make dropdown list in winform having auto post feature like in asp.net

Posted 21 March 2019 - 05:37 AM

I did try it but needs a button to perform another action.
Was This Post Helpful? 0
  • +
  • -

#6 andrewsw   User is offline

  • quantum multiprover
  • member icon

Reputation: 6777
  • View blog
  • Posts: 27,959
  • Joined: 12-December 12

Re: Make dropdown list in winform having auto post feature like in asp.net

Posted 21 March 2019 - 06:14 AM

That sentence makes no sense. What are you trying to say? If you have placed code in SelectedIndexChanged then it will execute... when the selected index is changed.
Was This Post Helpful? 0
  • +
  • -

#7 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 210
  • View blog
  • Posts: 1,190
  • Joined: 05-December 13

Re: Make dropdown list in winform having auto post feature like in asp.net

Posted 21 March 2019 - 06:25 AM

View Postaspfun, on 21 March 2019 - 12:37 PM, said:

I did try it but needs a button to perform another action.
Do show me where in the documentation does it say you need a button to execute the SelectedIndexChanged event? If you followed what I demonstrated in the Gif, and then wrote code inside the SelectedIndexChanged event, it will fire when you change the index on your UI. I didn't link the documentation for fun. Read it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1