This is a migrated thread and some comments may be shown as answers.

dataGrid Column Width Doesn't work

3 Answers 306 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 07 Sep 2018, 10:23 PM

Hi,

I have not been able to set the Column Widths of my data grid.

           <my:RadDataGrid x:Name="grdContacts" SelectionChanged="grdContacts_SelectionChanged" AutoGenerateColumns="False" >
                <my:RadDataGrid.Columns>
                    <my:DataGridTextColumn PropertyName="FullName" Width="250"/>
                    <my:DataGridTextColumn PropertyName="Phone1" Header="Phone" Width="120"/>
                    <my:DataGridTextColumn PropertyName="Status" Width="60"/>
                    <my:DataGridTextColumn PropertyName="RecentNote" Header="Recent Note" />
                </my:RadDataGrid.Columns>

            </my:RadDataGrid>

All the columns are equally spaced.  

Any solution?

3 Answers, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 10 Sep 2018, 03:26 PM
Hi Robert,

Thank you for the provided code.

The width of each column in a RadDataGrid for UWP depends on its SizeMode and Width properties. In this case the Width property of the columns will apply when the SizeMode="Fixed". For more information how this could be achieved please take a look at the following link in our documentation: How to set a column's width

Let me know if you have any other questions on this.

Regards,
Didi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Robert
Top achievements
Rank 1
answered on 13 Sep 2018, 11:07 AM
Thanks for that answer.  Still getting familiar with the DataGrid control.
0
Robert
Top achievements
Rank 1
answered on 21 Sep 2018, 10:26 PM
Thanks for that.  New to Telerik Datagrid so lot's of differences
Tags
DataGrid
Asked by
Robert
Top achievements
Rank 1
Answers by
Didi
Telerik team
Robert
Top achievements
Rank 1
Share this question
or