How to handle item reorder through viewmodel?

2 posts, 0 answers
  1. Oleg
    Oleg avatar
    7 posts
    Member since:
    Jul 2012

    Posted 07 Nov 2012 Link to this post

    Hi, i have a RadDataBoundListBox, i want to bind item reorder event to my viewmodel:
    <tp:RadDataBoundListBox x:Name="ChanelsList"
                            ItemsSource="{Binding Channels, Mode=TwoWay}"
                            ItemTemplate="{StaticResource EditChannelTemplate}"
                            IsItemReorderEnabled="True" />

    After reordering ObservableCollection does not change.
    I was seeking here
    for appropriate event after reordering listbox collection, but did not find anything. 

  2. Deyan
    Deyan avatar
    2026 posts

    Posted 07 Nov 2012 Link to this post

    Hello Oleg,

    Thanks for writing.

    The reordering of items within the source collection of the DataBoundListBox control happens synchronously with the reordering of visual items, i.e. items are reordered in the source collection as soon as you start changing the order via the User Interface.

    Can you please share with us a sample that demonstrates your issue so that we can take a look and see what goes wrong? Normally you should have your items ordered in the source collection.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top