AutoGenerateColumns Ignored under certain conditions

2 posts, 0 answers
  1. StevenDale
    StevenDale avatar
    100 posts
    Member since:
    Apr 2007

    Posted 14 Oct 2009 Link to this post

    I have the latest build of WPF Q2 SP1 and I am getting the following error:
    A TwoWay or OneWayToSource binding cannot work on the read-only property 'xxx' of type 'TelerikTestProject.TestClass'. This error happens whenever I place the GridView inside of a Actipro PopupButton and then inside of a Actipro ResizableContentControl. If I take the RadGrid out of the control I don't get the error. I have a sample project I can send you to reproduce the error.

    <Window x:Class="TelerikTestProject.Window1" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="Window1" Height="300" Width="300"   
        xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared" 
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
            > 
        <Grid> 
            <shared:PopupButton Grid.Column="1" HorizontalContentAlignment="Left" BorderThickness="0" BorderBrush="Transparent" PopupContent="{Binding}" VerticalContentAlignment="Center" Margin="0" Background="Transparent" IsRounded="True" DisplayMode="Merged">  
                <shared:PopupButton.PopupContentTemplate> 
                    <DataTemplate> 
                        <shared:ResizableContentControl MinHeight="50" MinWidth="300" Padding="1" > 
                            <telerik:RadGridView ItemsSource="{Binding Items}" AutoGenerateColumns="False" ShowGroupPanel="False">  
                                <telerik:RadGridView.Columns> 
                                    <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Path=Comments}" UniqueName="{x:Null}"/>                                  
                                </telerik:RadGridView.Columns> 
                            </telerik:RadGridView> 
     
                        </shared:ResizableContentControl> 
                    </DataTemplate> 
                </shared:PopupButton.PopupContentTemplate> 
            </shared:PopupButton> 
     
        </Grid> 
    </Window> 
     

    Thanks,

    Billy Jacobs
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 15 Oct 2009 Link to this post

    Hi Billy Jacobs,

    Under some conditions AutoGenerateColumns does get ignored but luckily we have fixed this problem for our Q3 release. For the time being you could try to place the AutoGenerateColumns attribute on first place (before the ItemsSource property) and you should get consistent behavior.

    Best wishes,
    Milan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top