views:

8

answers:

0
  1. I have a DataGrid that is bound to a drop-down list.
  2. Each time I change the selected item in the drop-down list, the grid's ItemSource changes.
  3. When this happens, the columns are automatically made wider if necessary.

My problem is that the columns are never made narrower. They just keep getting wider and wider until they reach the maximum width of any contained data.

How do I tell the DataGrid to automatically shrink the columns? If not possible, then how do I manually tell it to recalc column widths?