Hello,
As the title says we are using the RadDataGrid with DataGridTemplateColumns and set a DataTemplate for the headers and groupheaders (globally defined in app.xaml but for simplicity here directly in the grid, but the issue remains the same).
When we set the binding for the HeaderText in the HeaderContentTemplate, the text is displayed correctly in the header, however in the output screen there are a lot of binding errors which significantly slows down the opening of the page. Same for the GroupHeaders when we bind to Group.Key in the DataTemplate, the groupheader is displaying correctly but the output is throwing binding errors.
01.
<
telerikDataGrid:RadDataGrid
x:Name
=
"ChecklistDetailGrid"
ItemsSource
=
"{Binding FilteredChecklistDetailGridItems}"
AutoGenerateColumns
=
"false"
UserEditMode
=
"None"
BackgroundColor
=
"White"
VerticalOptions
=
"FillAndExpand"
>
02.
<
telerikDataGrid:RadDataGrid.GroupDescriptors
>
03.
<
telerikCommon:PropertyGroupDescriptor
PropertyName
=
"ParameterType"
/>
04.
</
telerikDataGrid:RadDataGrid.GroupDescriptors
>
05.
<
telerikDataGrid:RadDataGrid.GroupHeaderTemplate
>
06.
<
DataTemplate
>
07.
<
StackLayout
Orientation
=
"Horizontal"
Margin
=
"5,0,0,0"
VerticalOptions
=
"Center"
>
08.
<
Label
Text
=
"{Binding Group.Key}"
FontAttributes
=
"Bold"
TextColor
=
"{StaticResource Secondary}"
FontSize
=
"16"
FontFamily
=
"QuicksandBold"
/>
09.
</
StackLayout
>
10.
</
DataTemplate
>
11.
</
telerikDataGrid:RadDataGrid.GroupHeaderTemplate
>
12.
<
telerikDataGrid:RadDataGrid.Columns
>
13.
<
telerikDataGrid:DataGridTemplateColumn
HeaderText
=
"{Static helpers:TranslatorFields.Labels_ChecklistGridHeader_Parameter}"
CellContentTemplate
=
"{StaticResource ParameterTemplate}"
CanUserSort
=
"False"
CanUserFilter
=
"False"
HeaderStyle
=
"{StaticResource DataGridColumnHeaderNoFilterStyle}"
>
14.
<
telerikDataGrid:DataGridTemplateColumn.HeaderContentTemplate
>
15.
<
DataTemplate
>
16.
<
Label
Text
=
"{Binding HeaderText}"
/>
17.
</
DataTemplate
>
18.
</
telerikDataGrid:DataGridTemplateColumn.HeaderContentTemplate
>
19.
</
telerikDataGrid:DataGridTemplateColumn
>
20.
</
telerikDataGrid:RadDataGrid.Columns
>
21.
</
telerikDataGrid:RadDataGrid
>
Output:
[0:] Binding: 'Group' property not found on 'CSD5_Mobile.ViewModels.Views.ChecklistDetailGridViewViewModel', target property: 'Xamarin.Forms.Label.Text'
[0:] Binding: 'Group' property not found on 'CSD5_Mobile.ViewModels.Views.ChecklistDetailGridViewViewModel', target property: 'Xamarin.Forms.Label.Text'
[0:] Binding: 'Group' property not found on 'CSD5_Mobile.ViewModels.Views.ChecklistDetailGridViewViewModel', target property: 'Xamarin.Forms.Label.Text'
[0:] Binding: 'HeaderText' property not found on 'CSD5_Mobile.ViewModels.Views.ChecklistDetailGridViewViewModel', target property: 'Xamarin.Forms.Label.Text'
Thread finished: #15
[0:] Binding: 'HeaderText' property not found on 'CSD5_Mobile.ViewModels.Views.ChecklistDetailGridViewViewModel', target property: 'Xamarin.Forms.Label.Text'
[0:] Binding: 'HeaderText' property not found on 'CSD5_Mobile.ViewModels.Views.ChecklistDetailGridViewViewModel', target property: 'Xamarin.Forms.Label.Text'
[0:] Binding: 'HeaderText' property not found on 'CSD5_Mobile.ViewModels.Views.ChecklistDetailGridViewViewModel', target property: 'Xamarin.Forms.Label.Text'
Are we doing something wrong or is this a bug?
Kind regards