This question is locked. New answers and comments are not allowed.
I am using the GroupHeaderTemplate to display information about each row
in my radgridview (which is bound to an ObservableCollection<> of my data
class). I am grouping by a unique field on each row so each item in my
grid will get it's own header.
My sample code is below. When I click the "DeleteButton" in the code
below the item is being removed from my collection correctly and the
grid row disappears, but the GroupHeaderTemplate instance for the row
remains visible even after the item is removed (and all items are
removed). However the binding to the item disappears since the item
itself is gone (meaning the Description disappears).
Any idea why this could be?
Thanks.
Dave
in my radgridview (which is bound to an ObservableCollection<> of my data
class). I am grouping by a unique field on each row so each item in my
grid will get it's own header.
My sample code is below. When I click the "DeleteButton" in the code
below the item is being removed from my collection correctly and the
grid row disappears, but the GroupHeaderTemplate instance for the row
remains visible even after the item is removed (and all items are
removed). However the binding to the item disappears since the item
itself is gone (meaning the Description disappears).
Any idea why this could be?
Thanks.
Dave
<
telerik:RadGridView.GroupHeaderTemplate
>
<
DataTemplate
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"20"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"250"
></
ColumnDefinition
>
</
Grid.ColumnDefinitions
>
<
telerik:RadButton
Grid.Column
=
"0"
x:Name
=
"DeleteButton"
Style
=
"{StaticResource ImageButtonStyle}"
Content
=
"Img/delete.png"
Command
=
"telerik:RadGridViewCommands.Delete"
CommandParameter
=
"{Binding Group.Items[0]}"
>
</
telerik:RadButton
>
<
TextBlock
Grid.Column
=
"1"
Text
=
"{Binding Group.Items[0].Description}"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:RadGridView.GroupHeaderTemplate
>