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

RadDataBoundListBox.DataRequested doesn't firing with EventToCommand behavior

4 Answers 35 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexey
Top achievements
Rank 1
Alexey asked on 11 Sep 2013, 01:32 PM
Hi.
I have a view:
<
telerikPrimitives:RadDataBoundListBox
    x:Name="TransactionsListBox"
    ItemsSource="{Binding Transactions}"
    DataVirtualizationItemTemplate="{Binding UserInterfaceVM.ReconcileTransactionItemTemplate, Source={StaticResource Locator}}"
    ScrollViewer.VerticalScrollBarVisibility="Disabled"
    DataVirtualizationMode="OnDemandAutomatic">
    <telerikPrimitives:RadDataBoundListBox.ItemLoadingTemplate>
        <DataTemplate>
            <telerikPrimitives:RadBusyIndicator IsRunning="True" AnimationStyle="AnimationStyle9"/>
        </DataTemplate>
    </telerikPrimitives:RadDataBoundListBox.ItemLoadingTemplate>
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="DataRequested">
            <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding RefreshCommand}"/>
        </i:EventTrigger>
    </i:Interaction.Triggers>
</telerikPrimitives:RadDataBoundListBox>
By RefreshCommand never fires. If I'm adding handler for DataRequested in code-behind, then I'm getting this event. What can be wrong?

4 Answers, 1 is accepted

Sort by
0
Alexey
Top achievements
Rank 1
answered on 11 Sep 2013, 02:15 PM
Resetting value of DataVirtualizationMode from None to OnDemandAutomatic in one of my states makes DataRequested fires.
0
Deyan
Telerik team
answered on 12 Sep 2013, 07:04 AM
Hi Alexey,

Thanks for writing.

Based on the code snippet alone I cannot exactly say why you won't have the event fired. You should set the DataVirtualizationMode to OnDemandAutomatic to get this event for sure. If you think there is an issue with this event, please open a new support ticket and attach your project for further investigation.

Thanks for your time.

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Alexey
Top achievements
Rank 1
answered on 12 Sep 2013, 07:41 AM
I've found that DataRequested not firing when ItemsSource is null (or binded to ItemsSource property list is null).
I set ItemsSource to some list and change value DataVirtualizationMode on "OnDemandAutomatic" then  DataRequested event appears.
This behavior not documented but it should be.
0
Deyan
Telerik team
answered on 12 Sep 2013, 07:44 AM
Hello Alexey,

Thanks for writing back.

Indeed, you need to have ItemsSource to be able to receive this event. We will make sure to update our online help.

Regards,
Deyan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
DataBoundListBox
Asked by
Alexey
Top achievements
Rank 1
Answers by
Alexey
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or