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

Close Button Implementation in RadTileViewItem

5 Answers 58 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Divya
Top achievements
Rank 1
Divya asked on 29 Aug 2011, 01:30 PM
Hi,

We have Dashboard implementation in our project and we add Widgets dynamically into this dashboard and we use RadTileView to implement this.

All was working fine and good till we upgraded our Telerik version to 2011.
Once we upgraded, all the widgets (RadTileViewItem) was in Minimized state itself and the positions were never adjusting dynamically. We identified that the possible problem could be because we used "Template" implementation for adding a close button in each Widget.

This template implementation was followed based on resolution provided in existing threads.
I would like to know if there is a clean approach for adding Close Button in 2011 version? Because once I removed the code for template all is working fine but I still would want close button. Please provide the sample snippet I could use.

Note: We would be adding Widgets dynamically and it would range from 4 - 8 in number.

Regards,
Divya S Selvan

5 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 01 Sep 2011, 02:47 PM
Hi Divya,

There is no built-in way for adding a Close button to the RadTileViewItems. You will need to add the button in the ControlTemplate of the RadTileViewItem.

From your description I understand that you have created a ControlTemplate with a close button that used to work. However, with the upgrade the CantrolTemplate might not work as the TileView control was recently improved. This is why I attached a sample project where I defined a sample Close button in the latest version of the RadTileViewItem ControlTemplate. You can use it as a starting point for updating your current ControlTemplate.

Also, if you send us your current template, we can update it for you.

Regards,
Tina Stancheva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Divya
Top achievements
Rank 1
answered on 07 Sep 2011, 09:59 AM
Tina,

I was not able to see any attachment with your reply. Please re-send.

Divya S Selvan
0
Tina Stancheva
Telerik team
answered on 07 Sep 2011, 11:04 AM
Hello Divya,

Please accpet my apology for leaving out the attachment. Here it is.

All the best,
Tina Stancheva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Jonathon
Top achievements
Rank 1
answered on 16 Sep 2011, 11:50 PM
Is there a way to implement a close button using MVVM?

I already have the close button implemented, I was just wondering if someone clicked the close button if it would remove the tile and also find which item it is in the observablecollection RadTileView is binding to.

Thanks,

Jonathon
0
Zarko
Telerik team
answered on 21 Sep 2011, 08:51 PM
Hi Jonathon,
There are a couple of ways to remove an item with a MVVM, but you'll always have to use a Command and a CommandParameter. I think that the easiest way is to create a command in your business object and invoke it on button click. After that you'll have to notify the main ViewModel that there's an item for removing - you can do that with an event or you can keep an reference to the main ViewModel in your business object and directly call a method in it.
I've attached a sample project so could you please examine it and if you have more questions feel free to ask.

Regards,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TileView
Asked by
Divya
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Divya
Top achievements
Rank 1
Jonathon
Top achievements
Rank 1
Zarko
Telerik team
Share this question
or