hi,
following setup: a radpane with a user control with a grid that has two rows (row 1 is height auto, row 2 is height *), the second row contains a radgridview. the gridview holds four columns gridviewdatacolumn, nothing fancy. i'm assigning an observablecollection to the itemssource in the usercontrol.loaded event handler.
for some reason the column widths are not set when starting the software. instead they are as it looks like set to the minimum width. it worked before and i can't remember doing anything to this part of the application.
i have to resize the pane or a column a bit or re-assign the observablecollection to the itemssource and then the correct widths are applied. tried with ColumnWidth="*" and with Width="*" on the GridViewDataColumn entries. also setting AutoGenerateColumns to true shows the same result. setting ColumnWidth="Auto" at least shows the full content for each row but looks ugly because it leaves too much whitespace.
i also replaced the whole usercontrol with a backup i made yesterday but same result. works in the backup, not in the current version. replaced also the other controls with old code and it's still not working.
any clue what could cause this behaviour or at least how i can force the gridview to recalculate the column sizes once the control is displayed?
following setup: a radpane with a user control with a grid that has two rows (row 1 is height auto, row 2 is height *), the second row contains a radgridview. the gridview holds four columns gridviewdatacolumn, nothing fancy. i'm assigning an observablecollection to the itemssource in the usercontrol.loaded event handler.
for some reason the column widths are not set when starting the software. instead they are as it looks like set to the minimum width. it worked before and i can't remember doing anything to this part of the application.
i have to resize the pane or a column a bit or re-assign the observablecollection to the itemssource and then the correct widths are applied. tried with ColumnWidth="*" and with Width="*" on the GridViewDataColumn entries. also setting AutoGenerateColumns to true shows the same result. setting ColumnWidth="Auto" at least shows the full content for each row but looks ugly because it leaves too much whitespace.
i also replaced the whole usercontrol with a backup i made yesterday but same result. works in the backup, not in the current version. replaced also the other controls with old code and it's still not working.
any clue what could cause this behaviour or at least how i can force the gridview to recalculate the column sizes once the control is displayed?
<
telerik:RadGridView
Grid.Row
=
"1"
ColumnWidth
=
"*"
VerticalAlignment
=
"Stretch"
HorizontalAlignment
=
"Stretch"
ShowGroupPanel
=
"False"
AutoGenerateColumns
=
"False"
CanUserInsertRows
=
"False"
CanUserDeleteRows
=
"False"
CanUserReorderColumns
=
"False"
ShowColumnHeaders
=
"True"
CanUserSortColumns
=
"False"
RowIndicatorVisibility
=
"Collapsed"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Title, Mode=OneWay}"
IsReadOnly
=
"True"
Header
=
"Chord"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding DisplayNotes, Mode=OneWay}"
IsReadOnly
=
"True"
Header
=
"Notes"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding NumNotes, Mode=OneWay}"
IsReadOnly
=
"True"
Header
=
"Notes"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding PlayKey, Mode=OneWay}"
IsReadOnly
=
"True"
Header
=
"Play"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>