DataGrid Resize Column

Oct 8, 2009 at 10:31 AM

When i manually resize a column in my datagrid, all the other columns (on the right) are moved and an horizontal scroolbar appear (if needed).

I would like when I resize a column to resize only the first one on the right.

There is a built-in way i didn't find?

Or there is an hidden event when user manually resize column?


Thanks in advance.

Apr 9, 2010 at 4:09 PM
Edited Apr 9, 2010 at 4:10 PM

Set the width of all or some of your columns to Auto : Width="Auto". This way, it only take the necessary space to show the data of the column. You can also set to * (Width="*") and the column will take all the remaining space. If you have one then more set to *, it will be split equally between them.