Solved

VB.net DataGridView rows with different control types

Posted on 2012-04-09
2
331 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

10 Experts available now in Live!

Get 1:1 Help Now