Results 1 to 5 of 5

Thread: SelectionChangeCommitted doesn’t run

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    10

    Unhappy SelectionChangeCommitted doesn’t run

    Hi
    When a user chooses an item in a combobox by clicking the item the event SelectionChangeCommitted runs, but if a user chooses an item by writing the item (I'm using findstring) the event doesn't run. Is there a way I can make that happen.

    Please help me.

    Fia

  2. #2
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: SelectionChangeCommitted doesn’t run

    Use the SelectedIndexChanged event instead.
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: SelectionChangeCommitted doesn’t run

    Think about what these events are for. The SelectionChangeCommitted event is raised when the user changes the selected item. If you're setting the selected item yourself then it makes complete sense that the SelectionChangeCommitted event is not raised. If you want to be notified whenever the SelectedIndex changes than, as dom suggests, you need to handle the event that is raised under those circumstances.

    Are you sure that you want to allow the user to enter values that are not in the list? If not then you need to set the DropDownStyle property to DropDownList, which prevents the user entering a value that is not in the list.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    10

    Re: SelectionChangeCommitted doesn’t run

    I have a DataGrid with ComboBox columns. I want the same thing to happen as when a user clicks and chooses an item in the ComboBox. When a user stands in the last row (new row) and clicks for choosing an item, a new row appears beneath. I want the same thing to happen when a user types in what he wants and it's in the list, as what you can do in Access ComboBoxes, and when he leaves the ComboBox a new row appears. Is there a way to make that happen?


    I have tried to explain my problem in so many questions; I hope I got it right this time.


    Fia

  5. #5
    Junior Member
    Join Date
    Aug 2006
    Posts
    21

    Re: SelectionChangeCommitted doesn’t run

    hello fialo ,
    how do you convert datagrid coloumn to combo and plz tell me how can i populate that combo by fetching values in that column plus how to write a searching criteria on that combo box to fetch related records in other datagrid columns

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width