Solved

ge the parent datagridview from DataGridViewComboBoxEditingControl

Posted on 2009-04-12
3
400 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
  • 2
3 Comments
 
LVL 39

Expert Comment

by:abel
Comment Utility
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
Comment Utility
I found the answer it's the editingcontroldatagridview property.
0
 
LVL 39

Accepted Solution

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now