Author Topic: Can I use pqCellcls instead of pq_cellcls?  (Read 1573 times)

luckduck

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 46
    • View Profile
Can I use pqCellcls instead of pq_cellcls?
« on: March 31, 2020, 02:54:06 pm »
Hi Support

I want to change the style of a specific part.
You can't use pq_cellcls and pq_rowcls because keys in JSON data are returned in camel case.

Can you use camel case keys like pqCellcls and pqRowcls?

Or is it possible to have a cls use a function?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Can I use pqCellcls instead of pq_cellcls?
« Reply #1 on: March 31, 2020, 10:02:37 pm »
There is no issue in json keys with underscore as such but if you are facing issue related to them, you can use these any of these 2 solutions:

1. Convert camel case to snake case in json data in the load event of grid.

2. use Range.style method to add styles to cells dynamically.

https://paramquery.com/pro/api#method-Range