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

ColumnWidth="*" as a Style Property

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

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"
        Title="MainWindow"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Window.Resources>
        <Style TargetType="{x:Type telerik:RadGridView}">
            <Setter Property="ShowGroupPanel"   Value="False"/>
            <Setter Property="ColumnWidth" Value="*"></Setter>
        </Style>
         
    </Window.Resources>
    <Grid Margin="40">
        <telerik:RadGridView  Name="gridViewCheckBox1" >
            <telerik:RadGridView.Columns>
                <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}" />
            </telerik:RadGridView.Columns>
 
        </telerik:RadGridView>
    </Grid>
</Window>

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
0
Vera
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,
Vera
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Hyddude
Top achievements
Rank 1
Answers by
Vera
Telerik team
Share this question
or