This question is locked. New answers and comments are not allowed.
I have a requirement as below.
Binding a data source to RadTileView, in every RadTileViewItem there are a ADD button and DELETE button, Clicking the ADD button will open a new RadTileViewItem so user can input new data, now i can't make the new RadTileViewItem maximize, this is my first question; My second question is how could i get some binding information, such as itemid of the current record, when i click DELETE button so i can delete from DB by this condition.
Thanks.
Binding a data source to RadTileView, in every RadTileViewItem there are a ADD button and DELETE button, Clicking the ADD button will open a new RadTileViewItem so user can input new data, now i can't make the new RadTileViewItem maximize, this is my first question; My second question is how could i get some binding information, such as itemid of the current record, when i click DELETE button so i can delete from DB by this condition.
Thanks.
5 Answers, 1 is accepted
0
L
Top achievements
Rank 1
answered on 07 Nov 2011, 04:54 PM
I tried to use ItemContainerGenerator.ContainerFromItem(NewItem) to find the new TileviewItem, However it's null.
0
Hi L,
I am not sure how you implement your scenario but if you use an MVVM approach - binding the RadTileView ItemsSource, you can examine the attached sample. Using DelagateCommands to implement the Add/Delete behavior can help you work only with the business data. Also, you can bind the TileState of the items and use a data property to control it.
Please examine the solution and let me know if it helps.
Greetings,
Tina Stancheva
the Telerik team
I am not sure how you implement your scenario but if you use an MVVM approach - binding the RadTileView ItemsSource, you can examine the attached sample. Using DelagateCommands to implement the Add/Delete behavior can help you work only with the business data. Also, you can bind the TileState of the items and use a data property to control it.
Please examine the solution and let me know if it helps.
Greetings,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
L
Top achievements
Rank 1
answered on 23 Nov 2011, 06:34 PM
Thanks. However i cant add a TileViewItemState property to my object, I tried to use PreviewTileStateChanged event to find my new abject and make it's TileViewItemState is Maximized, but there is a problem, when the TileViewItem Maximized, the old Maximized seems still on the background, for example, now there are 3 TileViewItems in a TileView, when I add a new one, there are still 3 TileViewItems in a TileView and an empty area on the MinimizedItemsPosition, do you have a better solution?
0
L
Top achievements
Rank 1
answered on 23 Nov 2011, 06:40 PM
BTW, I have another question, when i bind my objects to a tileview's itemsource, how I make the first one or last one's tileViewItemState Maximized? Thanks!
0
Hello L,
Petar Mladenov
the Telerik team
Why are you unable to introduce TileState property in your business object ? Have you considered making a ViewModel wrapper class that will wrap your object from the DB and introduce new properties to it? It is worthy, because binding the TileViewItemState is the preferred way to handle such scenarios in MVVM way.
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>