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" 
EmptyDataText="There isn't any no Data"  
  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, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.