Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Datagridview column resizing

Hello,
If I set  columns to resize to cell, the users cannot resize the columns.

.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
  .AllowUserToResizeColumns = True

Open in new window


Any suggestions? I am using vb.net desktop application

Thanks
Avatar of Dorababu M
Dorababu M
Flag of India image

So what was the issue, you don't want user to resize them?
If so use the following property
dataGridView1.AllowUserToResizeColumns = false;

Open in new window

Avatar of RIAS

ASKER

Hello,

I need the users to resize the columns and also make the grid to have
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
By default datagirdview allows you right so what else you needed?
OK so with the above property set you want user to resize columns
Avatar of RIAS

ASKER

Yes.Thanks
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Thanks.