This question is locked. New answers and comments are not allowed.
Hi,
How can i bind values to GridViewColumnGroup HeaderTemplate pro grammatically.
I have datatemplate as above and i am adding the template programitically,
Now how can i bind values to DataTemplate???
How can i bind values to GridViewColumnGroup HeaderTemplate pro grammatically.
<
DataTemplate
x:Key
=
"GroupeHeaderScoresTemplate"
>
<
StackPanel
DataContext
=
"{Binding AssignmentHeaders}"
>
<
TextBox
Text
=
"{Binding AssignmentShortName}"
Height
=
"25"
TextWrapping
=
"Wrap"
/>
<
TextBox
Text
=
"{Binding AssignmentDescription}"
Height
=
"25"
TextWrapping
=
"Wrap"
/>
<
TextBox
Text
=
"{Binding AssignmentMarkingPeriod}"
Height
=
"25"
TextWrapping
=
"Wrap"
/>
<
TextBox
Text
=
"{Binding AssignmentCategory}"
Height
=
"25"
TextWrapping
=
"Wrap"
/>
<
telerik:RadDatePicker
SelectedDate
=
"{Binding AssignmentDate}"
Height
=
"25"
></
telerik:RadDatePicker
>
<
TextBox
Text
=
"{Binding AssignmentWeight}"
Height
=
"25"
TextWrapping
=
"Wrap"
/>
<
TextBox
Text
=
"{Binding AssignmentPossiblePoints}"
Height
=
"25"
TextWrapping
=
"Wrap"
/>
</
StackPanel
>
</
DataTemplate
>
I have datatemplate as above and i am adding the template programitically,
var gridViewColumnScoreGroup = new GridViewColumnGroup { Name = "ColumnScoresGroup" + i, HeaderTemplate = CreateTemplate(i) };
GridGradeView.ColumnGroups.Add(gridViewColumnScoreGroup);
Now how can i bind values to DataTemplate???