TileViewItem Position changed event

8 posts, 2 answers
  1. David Clenet
    David Clenet avatar
    3 posts
    Member since:
    Nov 2009

    Posted 17 Nov 2009 Link to this post

    Hello,
    I want to save the position of my items on the tileview for each of my users.
    I'm able to get them by using Grid.GetColumn and Grid.GetRow.
    The problem is that i'm not able to know when those postion changed.
    Is there any way to be informed when the user is changing the position of the TileViewItem on the TileView ?

    Thanks for your Answer.
    David
  2. Answer
    Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 17 Nov 2009 Link to this post

    Hello David,

    Saving the current tiles layout is one of the planned features for TileView. However, at the moment there is no easy way to save the tiles positions.  There is also no event that is fired when the position of a tile is changed (this can only happen if the user reorders the tiles with drag and drop). Would the following work for you - instead of listening for changes in a tile's position, you only get it when the application is closed/exited (which would be the only position you need to save anyway)?

    All the best,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. David Clenet
    David Clenet avatar
    3 posts
    Member since:
    Nov 2009

    Posted 17 Nov 2009 Link to this post

    With the Application close or exit is a solution, but in this case, i have to but the states of each items to Restored to be sure the positions are good.
    Will it work ?
    David
  5. Answer
    Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 17 Nov 2009 Link to this post

    Hi David,

    There is no need to restore the items before getting their final position - when there's maximized item the tiles keep their correct grid row/column.

    Best wishes,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Kenneth
    Kenneth avatar
    70 posts
    Member since:
    Feb 2008

    Posted 06 Jan 2010 Link to this post

    I have the same problem. Has there been a solution to this. Would like to know when a tile was draged/dropped into a different position? Has such an event been added yet? Or, is there another solution that's been thought of yet?

    Saving on exit doesn't work in this scenario. Need to know the moment a tile has changed its position via drag drop operation.
  7. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 07 Jan 2010 Link to this post

    Hi Kenneth,

    Currently the TileView does not fire an event when a tile is dragged. We have planned to add such an event and also improve the support for scenarios like the one you inquire about.

    All the best,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Kenneth
    Kenneth avatar
    70 posts
    Member since:
    Feb 2008

    Posted 10 Jan 2010 Link to this post

    How do you get the column, row from the radtileviewitem. I see that someone mentioned:

    I'm able to get them by using Grid.GetColumn and Grid.GetRow

    But I can't see how to do this. Please explain.

    Thanks,
    Ken
  9. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 11 Jan 2010 Link to this post

    Hi Kenneth,

    It's pretty straightforward:

    int itemRow = Grid.GetRow(myTileViewItem);
    int itemColumn = Grid.GetColumn(myTileViewItem);


    Note that you should use the above methods with RadTileViewItem objects. In case you are data binding the TileView, you can get a reference to the dynamically created RadTileViewItem containers that will wrap the business objects from your data source by using the ItemContainerGenerator:

    RadTileViewItem container = myTileView.ItemContainerGenerator.ContainerFromItem(myBusinessObject) as RadTileViewItem;

    Keep in mind that the ItemContainerGenerator will return the containers only after they have been created, i.e. the TileView has actually been rendered on the screen.

    Let me know if the above info helps.

    Kind regards,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
DevCraft banner