473,395 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DataGridView layout control in windows forms

Hi All -

I'm working on my first real c# windows forms - but I've done c# web
development for awhile. The problem that I'm running into is with
defining a layout structure for a dataGridView cell.

In a gridview or a datarepeater you can use a template, but that
flexability doesn't seem readily available in the dataGridView.

Is there a way to apply that kind of control (item template w/
multiline within a single cell) in the dataGridView? The multiline
part is the most important part.

If not, some very quick suggestions for tools more suited would be
greatly appreciated. I've spent quite awhile online and haven't had
much luck finding template controls which can do more than change color
attributes and things of that nature.

Thanks!

Nov 29 '06 #1
1 4645
Jon,

There is a lot possible, two examples

dgv.Columns["x"] .AutoSizeMode =
DataGridViewAutoSizeColumnMode.DisplayedCells
dgv.Columns["x"].DefaultCellStyle.WrapMode = DataGridViewTriState.True

Cor

<jo*******@gmail.comschreef in bericht
news:11**********************@n67g2000cwd.googlegr oups.com...
Hi All -

I'm working on my first real c# windows forms - but I've done c# web
development for awhile. The problem that I'm running into is with
defining a layout structure for a dataGridView cell.

In a gridview or a datarepeater you can use a template, but that
flexability doesn't seem readily available in the dataGridView.

Is there a way to apply that kind of control (item template w/
multiline within a single cell) in the dataGridView? The multiline
part is the most important part.

If not, some very quick suggestions for tools more suited would be
greatly appreciated. I've spent quite awhile online and haven't had
much luck finding template controls which can do more than change color
attributes and things of that nature.

Thanks!

Nov 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jacob John | last post by:
how to populate a treeview in c#.net (windows forms) from a SQL Server database ??? pls help me. thanks in advance, JJK
0
by: Tim Haughton | last post by:
I've just released an article on using Test Driven Development with C# and Windows Forms. GUI's are often difficult to test, so I thought it might be of interest. The article along with the...
1
by: William Sullivan | last post by:
I've spent plenty of time building windows forms, but I'm working on a web project now. I've scanned a few ASP NET books, checked out some tutorials, but I am unable to figure out how to lay out...
5
by: Mahesh Devjibhai Dhola [MVP] | last post by:
Hi, How to achieve effect of LayoutManagers like java has Grid, Flow, Border etc layouts in .Net? The case is: I am creating the form runtime and adding controls on run-time so at that time its...
0
by: Code Monkey | last post by:
In project there is a DataGridView. I have a little bit of code that I which displays information based on the cell that was clicked. My problem is how to detect if the user clicked on a...
0
by: stevenhaochen | last post by:
I add a user control (a simple textbox control) to customize datagridview column to test how to add user control to datagridview. I found a weired behavior. I can not input "q", "!", "#". But I...
1
by: sheperson | last post by:
Hi, I am new to C# and I am writing a program which uses several DataGridViews. Because DataGridView is a complex control, handling different situations where error may occur in a DataGridView is...
1
by: Venu | last post by:
Hi everyone, How to do pagination for a DataGridView in a Windows Forms application? Please help me. Thank you, Venu.
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.