0

Within my web-part, I want to make the header row of a gridview match the css from the sharepoint css class called ms-ContentAccent1-bgColor(I want to match the theme of the site). However, when I apply the css to the Headerstyle with the Css-Class it does not apply it. Is there any way I can apply the css while using the sharepoint gridview?

<Sharepoint:SPGridView runat="server" 
AutoGenerateColumns="False" 
ID="grid" 
EmptyDataText="There isn't any no Data"  
HeaderStyle-CssClass="ms-ContentAccent1-bgColor" 
AlternatingRowStyle-BackColor="ControlLightLight" 
>

1 Answer 1

0
  1. You need to override out of the box SharePoint CSS classe's.

  2. In master page, take the reference of your CSS file after the out of the box CSS file.

<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/core.css"/>
<link rel="stylesheet" type="text/css" href="/_layouts/Amit/styles/AmitKumarCustomStyle.css" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.