Skip to main content
Solved

How we can change the Headings Style in Acumatica grids?

  • December 17, 2021
  • 5 replies
  • 689 views

aaghaei
Captain II
Forum|alt.badge.img+10

Hello,

I was womndering is there any way to change the Headings Style in Acumatica grids? For example Change Fore/Back color or font style. I used this help from Stackoverflow

https://stackoverflow.com/questions/42429061/acumatica-styling-a-specific-column-in-pxgrid/70338582#70338582 

and managed to create the below but I’m wondering how I can set the same color to the grid headins?

 

 

Best answer by aaghaei

Thank you very much @Hughes Beausejour. Not all columns have the same color. I will try JavaScript to see how it works out

View original
Did this topic help you find an answer to your question?

5 replies

Hughes Beausejour
Acumatica Employee
Forum|alt.badge.img+2
  • Acumatica Developer Support Team
  • 91 replies
  • December 17, 2021

If it’s a global change you can modify Acumatica controls theme files located in folder:
App_Themes\Default\00_Controls.css
App_Themes\Indigo\00_Controls.css

This is a better option than replacing the ‘ASPX.cs’ file.

I added this test style for GridHeader CSS class at the end of theme files:
.GridHeader {
  background-color: yellow !important;
  color: black !important;
  font-family: courrier !important;
}

After clearing web browser cache the changes will be applied to all grid controls inside Acumatica:

EDIT

Changing each column header individually is going to be a challenge. I see no direct access to this control in ASPX.cs file. If that’s exact then there’s only JavaScript which you can use:

document.getElementById("ctl00_phL_gridTasks_colHS_0_0").childNodes[0].style = "background: yellow !important"


aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • 1206 replies
  • Answer
  • December 20, 2021

Thank you very much @Hughes Beausejour. Not all columns have the same color. I will try JavaScript to see how it works out


Hughes Beausejour
Acumatica Employee
Forum|alt.badge.img+2
  • Acumatica Developer Support Team
  • 91 replies
  • December 20, 2021

You can use instructions here to setup the JavaScript object:
https://stackoverflow.com/a/56606990/7376238

 

Note that it is not best practice to do so and it will not pass ISV Certification if required.
Keep in mind that columns might change based on the column configurator settings (top-left button of grid).


  • Freshman I
  • 8 replies
  • September 7, 2023

Hi, @aaghaei did you find a solution for this issue?


aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • 1206 replies
  • September 9, 2023

@Thulshi it is not possible with C# but you can make it work using JS but it might behave differently by each browser I decided not to do it.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings