DataGridView layout control in windows forms

J

jon.paine

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!
 
C

Cor Ligthert [MVP]

Jon,

There is a lot possible, two examples

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

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top