I recently wanted to add "headers" to my ListBox and was able to do so thanks to the following post:
http://www.telerik.com/forums/can-a-listbox-have-headers
However, now I haven't been able to have the entries in the listbox refresh when the underlying data changes. It seemed to work just find before the "headers" were added. I have attached the original code when the data binding seemed to work fine:
<telerik:RadListBox HorizontalAlignment="Left" Height="235" Margin="24,13,0,0" VerticalAlignment="Top" Width="510" ItemsSource="{Binding Associates, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="{Binding AssocIdx, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" DisplayMemberPath="display">
</telerik:RadListBox>
and the code where the headers works fine (but data binding doesn't seem to work when the data changes...):
<
telerik:RadListBox
HorizontalAlignment
=
"Left"
Height
=
"235"
Margin
=
"24,13,0,0"
VerticalAlignment
=
"Top"
Width
=
"510"
ItemsSource
=
"{Binding Source={StaticResource groups}, UpdateSourceTrigger=PropertyChanged}"
SelectedIndex
=
"{Binding AssocIdx, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
DisplayMemberPath
=
""
>
<
telerik:RadListBox.ItemTemplate
>
<
DataTemplate
>
<
VirtualizingStackPanel
>
<
TextBlock
Text
=
"{Binding display}"
/>
</
VirtualizingStackPanel
>
</
DataTemplate
>
</
telerik:RadListBox.ItemTemplate
>
<
telerik:RadListBox.GroupStyle
>
<
GroupStyle
HeaderTemplate
=
"{StaticResource groupTemplate}"
/>
</
telerik:RadListBox.GroupStyle
>
</
telerik:RadListBox
>