Solved

VB.net DataGridView rows with different control types

Posted on 2012-04-09
2
337 Views
Last Modified: 2012-04-09
Hi

Is it possible to have a DataGridView with the first row containing Textboxes and the second containing ComboBoxes? If not can you have both as ComboBoxes and make the first one look like a TextBox
0
Comment
Question by:murbro
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 37823461
The DataGridView has been designed so that you define the type of control on the columns, which makes sense, since each column usually displays a given type of data.

So there is no way to do what you want in the DataGridView itself.

You could however simulate what you want by overlaying the cells with standard controls. Simply create standard controls, and give them the same location and size as the cells you want to replace. When the user clicks on a cell, you transfer the cell data in the overlaying control and make it visible. When the user leave the overlaying control, you take its content, transfer it to the cell and hide the overlaying control.
0
 

Author Closing Comment

by:murbro
ID: 37823483
Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
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…

856 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