BindingExpression path error: ContentHorizontalOffset

7 posts, 0 answers
  1. Phillip Garrett
    Phillip Garrett avatar
    25 posts
    Member since:
    Apr 2010

    Posted 03 Sep 2010 Link to this post

    Hi,

    I'm getting the following error:

    System.Windows.Data Error: BindingExpression path error: 'ContentHorizontalOffset' property not found on 'Type'

    I do <telerik:RadGridView ItemsSource="{Binding Collection}" />
    Where Collection is an ObservableCollection<Type>.

    Something out of my control appears to be trying to locate a ContentHorizontalOffset property in my Type class.

    The error doesn't seem to effect (i.e. application still works). Could you help me understand why these messages appear?

    Thanks,

    Phill
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 03 Sep 2010 Link to this post

    Hi Phillip Garrett,

    My assumption is that you have defined a GridViewDataColumn which is bound to a ContentHorizontalOffset property of your class, but such property does not exist. Please check the spelling.

    Can you post here more information like the related class definition and gridview declaration?

    Thanks

    Best wishes,
    Veselin Vasilev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Phillip Garrett
    Phillip Garrett avatar
    25 posts
    Member since:
    Apr 2010

    Posted 06 Sep 2010 Link to this post

    Hi,

    I have discovered that it is the DataLoadMode property on the RadGridView that causes the generation of these error messages.
    With DataLoadMode="Asynchronous" the errors appear; with DataLoadMode="Synchronous" the errors magically disappear.
    Any thoughts?

    Regards,

    Phill
  5. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 08 Sep 2010 Link to this post

    we have the same issue here is our grid (it's the only one in which we have it):
    <telerik:RadGridView AutoGenerateColumns="False"
                                  IsReadOnly="True"
                                  x:Name="grid"
                                  Height="585"
                                  Background="White"
                                  CanUserReorderColumns="False"
                                  CanUserResizeColumns="False"
                                  RowIndicatorVisibility="Collapsed"
                                  ShowGroupPanel="False"
                                  CanUserFreezeColumns="False"
                                  IsFilteringAllowed="False"
                                  GridLinesVisibility="None"
                                  BorderThickness="0 0 0 1" Visibility="{Binding MoreThanZeroTasks, Converter={StaticResource BooleanToVisibilityConverter}}"
                                  ItemsSource="{Binding Tasks}"
                                  DataLoadMode="Asynchronous">
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn HeaderTextAlignment="Left" Header="Status" DataMemberBinding="{Binding}" SortMemberPath="TaskDeadlineDate">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <Image Stretch="None" Source="{Binding Converter={StaticResource TaskDeadlineToImgURLConverter}}" HorizontalAlignment="Left" />
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Header="Deadline" DataMemberBinding="{Binding TaskDeadlineDate}" DataFormatString="{}{0:dd/MM/yyyy}"/>
                                <telerik:GridViewDataColumn Width="150" DataMemberBinding="{Binding NameTMText}">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding NameTMText, Converter={StaticResource StringCutConverter}, ConverterParameter=25}" Cursor="Hand" ToolTipService.ToolTip="{Binding NameTMText}" />
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn Width="270" DataMemberBinding="{Binding DescriptionTMText}">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding DescriptionTMText, Converter={StaticResource StringCutConverter}, ConverterParameter=44}" Cursor="Hand" ToolTipService.ToolTip="{Binding DescriptionTMText}" />
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                            </telerik:GridViewDataColumn>
                            <telerik:GridViewDataColumn Width="60" DataMemberBinding="{Binding TaskCategoryOD.Description}">
                                <telerik:GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TaskCategoryOD.Description, Converter={StaticResource StringCutConverter}, ConverterParameter=8}" Cursor="Hand" ToolTipService.ToolTip="{Binding TaskCategoryOD.Description}" />
                                    </DataTemplate>
                                </telerik:GridViewColumn.CellTemplate>
                            </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn HeaderTextAlignment="Left" Header="Type" DataMemberBinding="{Binding TaskTypeOD.Code}">
                                    <telerik:GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <Image Source="{Binding TaskTypeOD.Code, Converter={StaticResource TaskTypeToImageConverter}}" HorizontalAlignment="Left" Height="16" Stretch="UniformToFill" ToolTipService.ToolTip="{Binding TaskTypeOD.Description}" />
                                        </DataTemplate>
                                    </telerik:GridViewColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
                            </telerik:RadGridView.Columns>
                            <telerik:RadGridView.SortDescriptors>
                                <telerikData:SortDescriptor Member="TaskDeadlineDate" SortDirection="Ascending" />
                            </telerik:RadGridView.SortDescriptors>
                        </telerik:RadGridView>
  6. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 09 Sep 2010 Link to this post

    Hello guys,

    That could be a bug in the asynchronous data load mode. To confirm that and find a solution easily we need to reproduce the problem. Can you please open a support ticket and attach a sample project there?

    Thank you

    Kind regards,
    Veselin Vasilev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Geoff Hardy
    Geoff Hardy avatar
    58 posts
    Member since:
    Feb 2010

    Posted 03 Nov 2010 Link to this post

    Was this ever fixed? I am having the same problem with these binding errors showing up, although nothing in my code references "ContentHorizontalOffset".

  8. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 04 Nov 2010 Link to this post

    Hi Geoff,

     Please download our latest build - the issue is already fixed!

    All the best,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner