How to make a button appear in a cell when a row is moused over?

3 posts, 0 answers
  1. Brian Sayatovic
    Brian Sayatovic avatar
    91 posts
    Member since:
    Nov 2009

    Posted 20 Feb 2012 Link to this post

    I'd like to have button/icon appear in a cell (either it's own cell, or within an existing cell with a composite template) when the row it is in is moused over.  I've seen a lot of web applications do this trick, but I'm trying to mimic it in Silverlight.

    Has anyone done this or have an idea how to pull it off?
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 21 Feb 2012 Link to this post

    Hello Brian,

     

    You may predefine the template of GridViewCell to achieve your goal.
    I am attaching you sample application which demonstrates how this can be achieved. 
    Will you verify how this corresponds to your needs? 




     

    Kind regards,
    Vanya Pavlova
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Brian Sayatovic
    Brian Sayatovic avatar
    91 posts
    Member since:
    Nov 2009

    Posted 21 Feb 2012 Link to this post

    Not quite, but I'll take some time to dig deeper.

    My cell template is essentially going to be a two-column grid (widths * and 20), where the first is a textblock holding a name and the second is more special.

    I want it to be an icon based on a value of the data item, or blank.  But, when the row (or cell if I must limit myself to that) is hovered over, it needs to be a menu with a drop-arrow (click it to reveal options you can perform -- similar to a right-click context menu).  I figure I can use a menu where the label content is an icon and alter it's border to be invisible or visible, or perhaps a dropdown button similarly.

    What I can't figure out is how to leverage the focus/mouseover state of the row/cell to alter the visual appearance of an item in thecell template.
Back to Top