?
Solved

VB.net DataGridView rows with different control types

Posted on 2012-04-09
2
Medium Priority
?
340 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 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