Solved

VB.net DataGridView rows with different control types

Posted on 2012-04-09
2
339 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:Murray Brown
ID: 37823483
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

696 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