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

AlternationCount causes columns to shrink

8 Answers 126 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Eugene
Top achievements
Rank 1
Eugene asked on 08 Mar 2012, 10:31 AM
Hi,

It seems that the RadGridViews AlternationCount causes the columns to shrink. This only happens when the RadGridView is nested within a collapsed expander and a scrollviewer.

<ScrollViewer>
   <Expander IsExpanded="False">
      <telerik:RadGridView AutoGenerateColumns="False"
                    ColumnWidth="*"    
                    AlternationCount="2"
                    ItemsSource="{Binding Products}" />
      </telerik:RadGridView>
   </Expander>
</ScrollViewer>

When I remove the AlternationCount property or set IsEpanded property on the expander to true - it seems to solve the issue.

I am using the latest version of WPF assemblies .net 4.0.

Regards
Eugene

8 Answers, 1 is accepted

Sort by
0
Vera
Telerik team
answered on 08 Mar 2012, 02:21 PM
Hello Eugene,

 
The issue you reported is caused by the ScrollViewer. May I ask you to share some more details about the scenario in your application? What are you trying to achieve by using the ScrollViewer? I would suggest you to remove it if possible in order the avoid the undesired behavior.

Looking forward to hearing from you.

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 >>
0
Eugene
Top achievements
Rank 1
answered on 08 Mar 2012, 02:44 PM
Hi,

I simplified the xaml in order to demonstrate the issue that we experiencing. The Scrollviewer wraps mutlitple panels. Each panel contains an expander. Some of these expanders, as shown below, contain RadGridViews. Together the panels exceed the maximum screen size.
The ScollViewer is used by the user to scroll to the desired panel.

Hope this explains my scenario.

Regards
Eugene
0
Vlad
Telerik team
answered on 09 Mar 2012, 09:07 AM
Hi,

We were able to fix this issue and the fix will be part of our next internal build - Monday. I've added 2000 Telerik points to your account. 

Thank you very much for your feedback once again!

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
danparker276
Top achievements
Rank 2
answered on 06 Oct 2012, 01:11 AM
I'm having problems that are problems with what seems to be the same thing.  If I remove the StackPanel named "spTheTrouble" in the code below it works.  The column widths are messed up otherwise.  This is a simplified version of my code so that's why I have the stackpanel.  I found this converting part of my code from Silverlight to WPF, so this works ok in Silverlight.
<Grid>
    <ScrollViewer Margin="10"
            BorderThickness="0" MinWidth="600" VerticalAlignment="Top">
                <telerik:RadExpander Width="500" BorderBrush="Black" BorderThickness="2"
                        Header="Test Expander Header">
                    <StackPanel Name="spTheTrouble">
                        <telerik:RadGridView>
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn Header="Header1" MinWidth="50" />
                                <telerik:GridViewDataColumn Header="Header2" MinWidth="50" />
                                <telerik:GridViewDataColumn Header="Header3" MinWidth="50" />
                                <telerik:GridViewDataColumn Header="HeaderAll" Width="*" />
                            </telerik:RadGridView.Columns>
 
                        </telerik:RadGridView>
                    </StackPanel>
                </telerik:RadExpander>
    </ScrollViewer>
</Grid>
0
danparker276
Top achievements
Rank 2
answered on 18 Oct 2012, 05:48 PM
Just wondering if you were able to reproduce this same issue I'm having.  It doesn't seem like the problem is fixed in my usage.
0
Vlad
Telerik team
answered on 19 Oct 2012, 06:06 AM
Hello,

 Have you tried our just released Q3 2012? Do you still have such problems? 

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
danparker276
Top achievements
Rank 2
answered on 19 Oct 2012, 05:18 PM
Yeah, just installed the latest version 2012.3.1017.40 and got the same thing.  You can just copy that code above and put it into your mainwindow
0
Maya
Telerik team
answered on 23 Oct 2012, 01:55 PM
Hello Eugene,

The issue is resolved and will be available in our internal build coming next week.

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Eugene
Top achievements
Rank 1
Answers by
Vera
Telerik team
Eugene
Top achievements
Rank 1
Vlad
Telerik team
danparker276
Top achievements
Rank 2
Maya
Telerik team
Share this question
or