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

TileViewItem Position changed event

7 Answers 116 Views
TileView
This is a migrated thread and some comments may be shown as answers.
David Clenet
Top achievements
Rank 1
David Clenet asked on 17 Nov 2009, 09:20 AM
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

7 Answers, 1 is accepted

Sort by
0
Accepted
Tihomir Petkov
Telerik team
answered on 17 Nov 2009, 09:46 AM
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.
0
David Clenet
Top achievements
Rank 1
answered on 17 Nov 2009, 09:53 AM
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
0
Accepted
Tihomir Petkov
Telerik team
answered on 17 Nov 2009, 10:08 AM
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.
0
Kenneth
Top achievements
Rank 1
answered on 07 Jan 2010, 12:51 AM
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.
0
Tihomir Petkov
Telerik team
answered on 07 Jan 2010, 08:18 AM
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.
0
Kenneth
Top achievements
Rank 1
answered on 10 Jan 2010, 10:28 PM
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
0
Tihomir Petkov
Telerik team
answered on 11 Jan 2010, 08:47 AM
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.
Tags
TileView
Asked by
David Clenet
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
David Clenet
Top achievements
Rank 1
Kenneth
Top achievements
Rank 1
Share this question
or