Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

In WPF how to resize the columns with min width set in DataGrid width set to auto.

$
0
0

Hi,

My application is like, user can add columns as many as he wants to DataGrid at runtime. And datagrid should also have automatic width when user resizes the window.

For this I have a datagrid width set to 'Auto'.  And columns get added runtime by user. And all the columns width is not fixed. And every column has a min width set so that user cannot resize a column beyond this min width.  This is also part of my requirement. This is working fine.

Now my problem is when there are many columns user added, datagrid width is increased automatically with scroll bar that we provided. And datagrid width is setting automatically such that all the columns width reaches to min width. But in this case, user is not able to resize the columns as min width for all the columns is reached. At the time say for example few cells have more lengthy text, user will not be able to see the full text (because this text cannot fit into the min width provided for the column). But I am providing a tooltip and trimming the text with ellipse at end. But I still need to provide the resizing to the columns, how can I do this?

Thanks in advance.

Regards,

Mohan.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>