dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersLaxmikant
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Resources » Code Snippets » Winforms DataGrid

Handle the Datagridview Combox SelectionChangeCommitted event in Windows Form


Posted Date:     Category: Winforms DataGrid    
Author: Member Level: Gold    Points: 10



 


Using this code you can handle the Datagridview Combox SelectionChangeCommitted event in Windows Form.

Using dataGridView1_EditingControlShowing we can do this



private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
ComboBox dgvCombo = e.Control as ComboBox;
if (dgvCombo != null)
{
// first remove event handler to keep from attaching multiple:
dgvCombo.SelectionChangeCommitted -= new EventHandler(dgvCombo_SelectionChangeCommitted);

// now attach the event handler

dgvCombo.SelectionChangeCommitted += new EventHandler(dgvCombo_SelectionChangeCommitted);

}

}

void dgvCombo_SelectionChangeCommitted(object sender, EventArgs e)
{
MessageBox.Show("Now Selected index changed");

}








Did you like this resource? Share it with your friends and show your love!


Responses to "Handle the Datagridview Combox SelectionChangeCommitted event in Windows Form"

No responses found. Be the first to respond...

Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: Set Default value for New Row of Datagirdview
    Previous Resource: Populating a Combobox in ASP from the Database
    Return to Resources
    Post New Resource
    Category: Winforms DataGrid


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    Combox SelectionChangeComm  .  Datagridview  .  



    Follow us on Twitter: https://twitter.com/dotnetspider

    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.