0 Comments

If you use a datagrid in the DataGrid.RowDetailsTemplate and set the last column width to * and the datagrid is set to HorizontalAlignment="Stretch", then you might get a horizontal scrollbar. To prevent this, set the HorizontalScrollBarVisibility="Disabled" on the top datagrid and subdatagrids

 

The first screendump show the datagrids with HorizontalScrollBarVisibility set to “Enabled”, as you can see at the bottom of the screendump, the datagrid contains a horizontal scrollbar. This is, because the last column width is set to *.

image

The second screendump shows the correct layout (with HorizontalScrollBarVisibility set to "Disabled")

image

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts