Solved

ge the parent datagridview from DataGridViewComboBoxEditingControl

Posted on 2009-04-12
3
414 Views
Last Modified: 2012-05-06
I have a form with three dgvs and I have to create three separate functions to capture the index changed event of the combobox.  Is it possible to get the parent grid name from the function or control to be able to combine all three events in one sub event?  I've looked all the properties and methods and don't see anything in particular that would work.  Any ideas?
0
Comment
Question by:ddepuemd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24125785
Though it might be necessary to see a code example before attempting to answer this, it sounds to me that what you are looking for is the .NamingContainer property, or the .NamingContainer.NamingContainer property (because you have layered grids).

In general, the NamingContainer, which returns an Object, can be cast to the type you expect it to be. Depending on where you are, you can do this recursively upwards, if your structure demands that.
0
 

Author Comment

by:ddepuemd
ID: 24125787
I found the answer it's the editingcontroldatagridview property.
0
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 24125837
They will point to the same object, but obviously, the EditingControlDataGridView is easier to use :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question