Solved

Host control in custom datagridview textbox

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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Suggested Solutions

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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