Increase columns width in Silverlight DataGrid to fill whole DG width

前端 未结 6 767
生来不讨喜
生来不讨喜 2021-02-05 11:49

I have a DataGrid Control which is bound to a SQL Table.

The XAML Code is:



        
6条回答
  •  既然无缘
    2021-02-05 12:40

    You can set it programmatically:

    var col = new DataGridTextColumn();
    col.Width = new DataGridLength(100, DataGridLengthUnitType.Star);                        
    Grid1.Columns.Add(col);
    

提交回复
热议问题