Solved

Host control in custom datagridview textbox

Posted on 2009-05-13
1
282 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

15 Experts available now in Live!

Get 1:1 Help Now