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

Styling the k-grid-header (MVC)

1 Answer 2244 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 2
Ian asked on 04 Jul 2013, 09:11 PM
I am trying to replace the header gradient on a grid on just one page, but my changes have had no effect. 

Using FireFox's Firebug I can see that the CSS rule has been overridden, but there is no visible change. 

<style type="text/css">
    .k-grid-header {
        background-image: url("@Url.Content("~/Images/gridheader.png")");
        background-repeat: repeat-x;
    }
</style>
 
 
@(Html.Kendo().Grid<Product>().Name("ProductsGrid").Columns(c =>
      {
          c.Bound(p => p.Name);
          c.Bound(p => p.Id);
      })
      .DataSource(d => d
                           .Ajax()
                           .Read(r => r.Action("GetProducts", "Data"))
      )
      )

1 Answer, 1 is accepted

Sort by
0
Accepted
Ian
Top achievements
Rank 2
answered on 04 Jul 2013, 09:50 PM
Here's what I found to solve it:

<style type="text/css">
     
    #ProductsGrid {
        font-family: verdana, sans-serif;
        font-size: 10px;
    }
 
    .k-header {
        background-image: url("@Url.Content("~/Images/gridheader.png")");
        background-repeat: repeat-x;
        color: white;
        font-weight: 700 !important;
    }
 
    .k-grid, .k-grid * { border: 0 !important; }
 
</style>
Tags
Grid
Asked by
Ian
Top achievements
Rank 2
Answers by
Ian
Top achievements
Rank 2
Share this question
or