RadDataBoundListBox.DataRequested doesn't firing with EventToCommand behavior

5 posts, 0 answers
  1. Alexey
    Alexey avatar
    21 posts
    Member since:
    Aug 2013

    Posted 11 Sep 2013 Link to this post

    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?
  2. Alexey
    Alexey avatar
    21 posts
    Member since:
    Aug 2013

    Posted 11 Sep 2013 Link to this post

    Resetting value of DataVirtualizationMode from None to OnDemandAutomatic in one of my states makes DataRequested fires.
  3. DevCraft banner
  4. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 12 Sep 2013 Link to this post

    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 >>
  5. Alexey
    Alexey avatar
    21 posts
    Member since:
    Aug 2013

    Posted 12 Sep 2013 Link to this post

    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.
  6. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 12 Sep 2013 Link to this post

    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 >>
Back to Top
DevCraft banner