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

ColumnWidth="*" as a Style Property

1 Answer 24 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Hyddude asked on 08 Mar 2012, 01:09 AM

It seems there is an issue with ColumnWidth property being speficied as a Style property for the RadGridView.  Here is my code

<Window x:Class="GridTest.MainWindow"
        <Style TargetType="{x:Type telerik:RadGridView}">
            <Setter Property="ShowGroupPanel"   Value="False"/>
            <Setter Property="ColumnWidth" Value="*"></Setter>
    <Grid Margin="40">
        <telerik:RadGridView  Name="gridViewCheckBox1" >
                <telerik:GridViewDataColumn Header="Qtr1"  DataMemberBinding="{Binding FinancialQuarter}" />
                <telerik:GridViewDataColumn Header="Qtr2" DataMemberBinding="{Binding FinancialQuarter}" />
                <telerik:GridViewDataColumn Header="Qtr3"  DataMemberBinding="{Binding FinancialQuarter}" />
                <telerik:GridViewDataColumn Header="Qtr4"  DataMemberBinding="{Binding FinancialQuarter}" />

The ShowGroupPanel="false" applies to the grid but I don't see the columns occupying all of the Grid's Width. Is this an existing bug of RadGridView?  Any help is appreciated.
Attached is the image of my output.

Note: It works when I specify this property explicitly for each of the RadGridView but not as a part of Style (either as a local resource/Window Resource/ ResourceDictionary)

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 08 Mar 2012, 01:36 PM
Hello Hyddude,

Thank you for reporting this issue. We will further investigate it in order to provide a fix.
As a workaround I would suggest you to use an explicit style by setting the x:Key attribute and RadGridView Style property to the keyed style.

Let us know in case further assistance is needed.

All the best,
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question