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

BindingExpression path error: ContentHorizontalOffset

6 Answers 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Phillip Garrett
Top achievements
Rank 1
Phillip Garrett asked on 03 Sep 2010, 12:33 PM
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

6 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 03 Sep 2010, 04:56 PM
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
0
Phillip Garrett
Top achievements
Rank 1
answered on 06 Sep 2010, 10:36 AM
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
0
Licenses
Top achievements
Rank 1
answered on 08 Sep 2010, 09:09 AM
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>
0
Veselin Vasilev
Telerik team
answered on 09 Sep 2010, 08:53 AM
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
0
Geoff Hardy
Top achievements
Rank 1
answered on 03 Nov 2010, 08:19 PM
Was this ever fixed? I am having the same problem with these binding errors showing up, although nothing in my code references "ContentHorizontalOffset".

0
Vlad
Telerik team
answered on 04 Nov 2010, 08:49 AM
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
Tags
GridView
Asked by
Phillip Garrett
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Phillip Garrett
Top achievements
Rank 1
Licenses
Top achievements
Rank 1
Geoff Hardy
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or