Databound order

6 posts, 1 answers
  1. James
    James avatar
    117 posts
    Member since:
    Mar 2009

    Posted 23 Apr 2010 Link to this post

    Hi,

    I have a TileView that is databound to a list of objects. Everything is working fine apart from keeping track of the order of the items. I'd hoped that when I re-ordered the tiles that they would be reordered in the list. But they aren't. Is this expected, or is there something wrong with my code? I'm databinding like this, so can't set 'TwoWay', but this form of databinding works ok elsewhere in the app:

    TileView.ItemsSource = MyObject;

    Thanks for your help, James.
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 28 Apr 2010 Link to this post

    Hello James,

    Thank you for your feedback. This scenario is currently not supported. However, I've logged it into our PITS under the name "TileView: Reorder underlying collection as tiles change position" and it will be available for tracking tomorrow the latest. If this feature request gathers enough popularity, we will definitely consider implementing it. Let me know if you have additional questions or comments on the topic.

    Regards,
    Kiril Stanoev
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. James
    James avatar
    117 posts
    Member since:
    Mar 2009

    Posted 28 Apr 2010 Link to this post

    Hi Kiril,

    Thanks for your reply. That's bad news from my point of view, as it really undermines the whole reason I constructed part of my application around this control! (It fits the use I'm putting it to perfectly.) Is there a way for me to handle this manually? i.e. just before saving my data, can I get the current order of items somehow?

    Thanks for your help, James.
  5. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 30 Apr 2010 Link to this post

    Hello James,

    RadTileView exposes an event called TilePositionChanged. It gets fired every time a tile changes its position. In the event handler of this event you can monitor the position of all the items. I'm attaching a sample project demonstrating one possible solution to this scenario. Have a look at it and let me know how it works for you.

    Regards,
    Kiril Stanoev
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  6. James
    James avatar
    117 posts
    Member since:
    Mar 2009

    Posted 14 May 2010 Link to this post

    Hi Kiril,

    Thanks - this line was a great help:
    RadTileViewItem tileViewItem = this.TileViewActiveReport.ItemContainerGenerator.ContainerFromIndex(i) as RadTileViewItem;

    Along with the knowledge that the RadTileViewItem has a 'position' property. I've got it working fine now. I do think that movement of tiles should be sent back to the data item, but the workaround is a good second best.

    Thanks, James.
  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 15 May 2010 Link to this post

    Hello James,

    We are glad that you got it working.

    Let us know if we can further assist you.

    Greetings,
    Tina Stancheva
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
DevCraft banner