Auto Column Width

  • Thread starter Thread starter PawelR
  • Start date Start date
P

PawelR

Hi Group,
In my app I have dataGridView with property AutoSizeColumnMode set on Fill.
In dgv I have few columns. One of them is DataGridViewCheckBoxColumn, other
are of DataGridViewTextBoxColumn type. How to set constant width for
DataGridViewCheckBoxColumn - minimum width needed to display CheckBox.


BR
Pawel
 
Hi,
The Easiest way to do it is as following:
Devide the 100% to the number of columns you have based on the width for
each column, for example, let us say that you have 5 columns; ID, Name, Desc,
BL (as a checkBox), ou can set the width of the ID to 10% for example, 10%
for the BL and the rest 80% will be devided to the rest of columns .. and so
and so..


this is the easiest way to do it :)


Husam Al-A'araj
 

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

Back
Top