Author Topic: Change cell style after change value  (Read 1787 times)

atmaneuler

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 33
    • View Profile
Change cell style after change value
« on: November 05, 2020, 12:31:15 pm »
Hi,

I want to change cell's style after changed value of that cell, but before I click the Update button on row.

Could paramquery do that?
How can I do that?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Change cell style after change value
« Reply #1 on: November 05, 2020, 02:14:46 pm »
pq-cell-dirty css class is added to such a cell.

So you can add style through css

Code: [Select]
.pq-grid-cell.pq-cell-dirty{
  color: red;
}

atmaneuler

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Change cell style after change value
« Reply #2 on: November 06, 2020, 12:16:56 pm »
Thank you.
In that case, what if I want Color cell is Red if user update cell value is 'true', and Yellow if user update cell value is 'false'?
How can I do that?


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Change cell style after change value
« Reply #3 on: November 06, 2020, 01:33:18 pm »
Code: [Select]
.pq-row-edit > .pq-grid-cell
{
    color:yellow;
}
.pq-row-edit > .pq-grid-cell.pq-cell-dirty
{
    color:red;
}