Solved

Host control in custom datagridview textbox

Posted on 2009-05-13
1
279 Views
Last Modified: 2013-11-07
I am using Visual basic .NET 2005

I am trying to host a button in my datagridview cell that is always there except in edit this is to launch another form for a long heavy lookup that will not fit in a combobox.

I've read the DataGridView FAQ:
http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/a44622c0-74e1-463b-97b9-27b87513747e#faq16

I'm trying to figure out which event to put the DataGridView.Controls.Add()

I have a custom class CustomDGVTextBoxColumn that has it's celltemplate set to CustomFGVTextBoxCell

I've tried putting it in the Public Sub New() but it gives me an Object Referenced is not set to an object error(probably the datagridview that hasn't been initialized)
0
Comment
Question by:james2432
1 Comment
 
LVL 1

Accepted Solution

by:
james2432 earned 0 total points
ID: 24378094
Decided to paint the Button and handle the x,y coordinates in the cell mousedown event
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

16 Experts available now in Live!

Get 1:1 Help Now