Grid command buttons visible on row hover

2 posts, 1 answers
  1. Datafyer
    Datafyer avatar
    66 posts
    Member since:
    Jun 2008

    Posted 23 Oct 2019 Link to this post

    Is it possible to make the grid command buttons visible on mouse hover of the row?

    Sometimes I feel have a grid full of buttons adds a little unnecessary visual noise.

  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    5937 posts

    Posted 24 Oct 2019 Link to this post

    Hello Patrick,

    When the following feature becomes available, you will be able to define your custom buttons with the desired styling:

    At the moment, you must have a dedicated column for them anyway, so even if you write a CSS rule that hides them initially the real estate would still be consumed by the column. Nevertheless, here's an example you can start from:


        .k-grid tbody tr .k-button.OnlyHover {
        .k-grid tbody tr:hover .k-button.OnlyHover {
    <TelerikGrid Data=@MyData EditMode="@GridEditMode.Inline" Pageable="true" Height="500px"
                 OnUpdate="@UpdateHandler" OnEdit="@EditHandler" OnDelete="@DeleteHandler" OnCreate="@CreateHandler" OnCancel="@CancelHandler">
            <GridCommandButton Command="Add" Icon="add">Add Employee</GridCommandButton>
            <GridColumn Field=@nameof(SampleData.ID) Title="ID" Editable="false" />
            <GridColumn Field=@nameof(SampleData.Name) Title="Name" />
                <GridCommandButton Class="OnlyHover" Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
                <GridCommandButton Class="OnlyHover" Command="Edit" Icon="edit">Edit</GridCommandButton>
                <GridCommandButton Class="OnlyHover" Command="Delete" Icon="delete">Delete</GridCommandButton>
                <GridCommandButton Class="OnlyHover" Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>



    Marin Bratanov
    Progress Telerik

     UI for Blazor
Back to Top