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

Headers and "UpdateSourceTrigger=PropertyChanged"

1 Answer 90 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Iron
Stephen asked on 22 Dec 2015, 06:47 PM

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>

1 Answer, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 23 Dec 2015, 12:49 PM
Hello Stephen,

Unfortunately the provided information is not sufficient for us to reproduce the explained behavior.

I will kindly ask that you open a support ticket and attach a sample project demonstrating your approach so we can get a better understanding of your scenario and investigate it.

Regards,
Polya
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
ListBox
Asked by
Stephen
Top achievements
Rank 1
Iron
Answers by
Polya
Telerik team
Share this question
or