Close Button Implementation in RadTileViewItem

6 posts, 0 answers
  1. Divya
    Divya avatar
    4 posts
    Member since:
    Mar 2011

    Posted 29 Aug 2011 Link to this post

    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
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 01 Sep 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Divya
    Divya avatar
    4 posts
    Member since:
    Mar 2011

    Posted 07 Sep 2011 Link to this post

    Tina,

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

    Divya S Selvan
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 07 Sep 2011 Link to this post

    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 >>

  6. Jonathon
    Jonathon avatar
    50 posts
    Member since:
    Aug 2011

    Posted 16 Sep 2011 Link to this post

    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
  7. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 21 Sep 2011 Link to this post

    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 >>

Back to Top
DevCraft banner