This is a migrated thread and some comments may be shown as answers.

Disable Mouseover Highlight For Single Grid

3 Answers 591 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jhudson
Top achievements
Rank 2
jhudson asked on 22 Feb 2016, 03:51 PM

 

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

3 Answers, 1 is accepted

Sort by
0
Accepted
Milena
Telerik team
answered on 24 Feb 2016, 10:33 AM
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
0
jhudson
Top achievements
Rank 2
answered on 26 Feb 2016, 04:56 PM

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

0
Milena
Telerik team
answered on 01 Mar 2016, 03:08 PM
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
Tags
Grid
Asked by
jhudson
Top achievements
Rank 2
Answers by
Milena
Telerik team
jhudson
Top achievements
Rank 2
Share this question
or