We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid Header Background Color

Hi,

 I have two grid one inside another (one is detail grid). I want to customize headers, specifically header background color.

I tried this and it changes all colors: https://www.syncfusion.com/forums/157740/unable-to-customise-a-dark-grid-header-background

Can you provide me for working example about that? Thanks in advance.


5 Replies 1 reply marked as answer

PS Prathap Senthil Syncfusion Team April 17, 2023 12:12 PM UTC

Hi Mustafa,

Based on your requirement, we have created a simple sample for you. Please refer the attached code snippet and screenshot for your reference, Kindly let us know if it meets your expectations. If you need further customization for the header of either the Grid or the detail grid, please provide us with more details so that we can proceed accordingly.

<style>

    .e-grid .e-headercell {

        background-color: aqua;

    }

</style>



Regards,
Prathap S


Attachment: DataGridWithDetailTemplate_8ef00bb5.zip


MK Mustafa Kuyucu April 24, 2023 06:12 AM UTC

Hi Prathap Senthil,


This is not what I want. In this example, the color of the sub-grid is also aqua. What I want is to make the headers of the grids different colors. So for example I want to make one Blue and the other red.


Thanks in advance.



BL Balamurugan Lakshmanan Syncfusion Team April 25, 2023 07:23 AM UTC

Hi Mustafa,


From your query, We understood that you need to make the headers of the grids different colors. We modify the sample as per your requirement. Kindly refer the below code snippet , Screenshot and attached sample file for your reference.


<style>

    #Grid1  .e-headercell {

        background-color: aqua;

    }

 

    #Grid2  .e-headercell {

        background-color:yellow;

    }

 

</style>




Please get back to us if you have further queries.


Regards,

Bala.


Attachment: BlazorApp1_6255e692.zip

Marked as answer

MK Mustafa Kuyucu replied to Balamurugan Lakshmanan May 1, 2023 01:59 PM UTC

  Thanks, everything is okay



BL Balamurugan Lakshmanan Syncfusion Team May 2, 2023 04:58 AM UTC

Hi Mustafa,


Thanks for your update.


We are glad to hear that you have resolved your query using our solution. Please get back to us if you have further queries.


Regards,

Bala.


Loader.
Live Chat Icon For mobile
Up arrow icon