Disable Mouseover Highlight For Single Grid

4 posts, 1 answers
  1. jhudson
    jhudson avatar
    11 posts
    Member since:
    Apr 2008

    Posted 22 Feb Link to this post

     

    I have a very simple grid. For this grid only is there a way to disable the row hover highlight? I want it everwhere else, just not for this grid.

    @(Html.Kendo().Grid<SalesRepSummaryItem>()
                          .Name("grid")
                          .NoRecords()
                          .Sortable()
                          .Columns(columns =>
                          {
                              columns.Bound(c => c.SalesRepFullName).Title("Sales Rep");
                              columns.Bound(c => c.TotalSales).Title("Invoiced Sales").Format("{0:c}").HtmlAttributes(new { @class = "money" }).Width(150);
                              columns.Bound(c => c.CalculatedTotalSales).Title("Total Sales").Format("{0:c}").HtmlAttributes(new { @class = "money" }).Width(150);
                              columns.Bound(c => c.NumberOfOrders).Title("# of Orders").Format("{0:0}");
                              columns.Bound(c => c.NumberOfItems).Title("# Of Items").Format("{0:0}");
                              columns.Bound(c => c.TotalOrdered).Title("Qty Ordered").Format("{0:0}");
                              columns.Bound(c => c.TotalShipped).Title("Qty Shipped").Format("{0:0}");
                          })
                          .DataSource(dataSource => dataSource
                              .Ajax()
                              .Read(read => read.Url(Url.HttpRouteUrl("Default", new { controller = "SalesRep", action = "Sales_GetSalesData" })).Data("getFilterValuesForGridRead")))

  2. Answer
    Milena
    Admin
    Milena avatar
    224 posts

    Posted 24 Feb Link to this post

    Hello,

    Please navigate to this help article, where you will find information about the desired functionality.

    Regards,
    Milena
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. jhudson
    jhudson avatar
    11 posts
    Member since:
    Apr 2008

    Posted 26 Feb in reply to Milena Link to this post

    perfect, I was more looking on how to do it to a particular grid. What I did was use HtmlAttributes to add my own css class to the grid and then modified the linked css just for that one grid.

     

    .HtmlAttributes(new { @class = "totalsGrid" })

     

     

     .totalsGrid.k-grid tr:not(.k-state-selected):hover {
            background: none;
            color: inherit;
        }

  5. Milena
    Admin
    Milena avatar
    224 posts

    Posted 01 Mar Link to this post

    Hello,

    I am glad to see that you have resolved the issue. Thank you for sharing your finding with the community.

    Regards,
    Milena
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready