How to change row font on mouse moves

4 posts, 0 answers
  1. Ofer
    Ofer avatar
    14 posts
    Member since:
    Apr 2009

    Posted 18 Jun 2009 Link to this post

    Hi,

    I need a different font in a grid data row when the mouse is on the row, and reset the font to default when the mouse moves to another grid row.

    How to do it?

    I couldn't find it in the UI editor.
  2. gerbrand
    gerbrand avatar
    78 posts
    Member since:
    Mar 2009

    Posted 18 Jun 2009 Link to this post

    Hi,

    You can handle this in the 'RowMouseMove' event of the radgrid.

    Gerbrand
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ofer
    Ofer avatar
    14 posts
    Member since:
    Apr 2009

    Posted 18 Jun 2009 Link to this post

    Hi,

    Thanks but your answer doesn't solve the problem.

    The RowMouseMove has no event args - 
    1) how to know which row the mouse is on?

    2) I need to restore the default font on the previous row the mouse was on - 
    how to know this?

    Thanks !


  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 23 Jun 2009 Link to this post

    Hi Ofer,

    Thank you for writing. I thing that the easiest method to apply different font size for a hovered row is using custom theme. You can prepare a custom theme by using our Visual Style Builder. Please follow the instructions below:

    1. Open Visual Style Builder from Start->Telerik -> RadControls For Winforms ....->Tools -> Visual style Builder
    2. Load RadGridView control from File->Load Control -> Telerik.WincontrolsUI -> RadGridView
    3. Select GridDataRowElement in the Control Structure tree on the left.
    4. For Initial State and other conditions set the desired font size. Last RowVisualState condition is for Hovered state. Set larger font size for it. Keep in mind that you have to set font for every one of the condition tabs, in order to restore initial size when grid row is not hovered.
    5. Set new name for your custom theme
    6. Save theme file File -> Save theme as
    7. Add the custom theme to your project.

    Do not hesitate to contact me again if you have other questions.

    Kind regards,
    Martin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top