Author Topic: Help with Showing dirty rows  (Read 2854 times)

WynApse

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 17
    • View Profile
Help with Showing dirty rows
« on: November 12, 2019, 03:33:08 am »
I have coded up single cells that show the red 'dirty' markers, but I'm not showing them in this jsfiddle.

What I'm trying to see is with the trackModel and recIndx setup … why I'm not seeing anything on the rows that get added when I click "Add Row".

Inside that function, I'm querying the grid for "IsDirty" and it does return true, but I was expecting a visual also as when I edit a single cell. … is that not the case?

Thanks!

-Dave

https://jsfiddle.net/1mrLdwq5/3/

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Help with Showing dirty rows
« Reply #1 on: November 12, 2019, 10:38:41 am »
objMain.dataModel = { data: dataMain }; in your code overwrites dataModel.recIndx property and sets it to undefined, so remove that line in order to see dirty cells.

https://jsfiddle.net/92Lqy8hr/

WynApse

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Help with Showing dirty rows
« Reply #2 on: November 15, 2019, 01:10:44 am »
Well... that was an incorrect modification of my code in the stripped-out version that I did to produce the jsfiddle. The real one didn't have either of those two lines.

So I modified the jsfiddle to remove the one you suggested and the one following that was unnecessary, and I'm still not seeing any visual of a dirty row:

https://jsfiddle.net/ceybnj0u/

Thanks!

-Dave

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Help with Showing dirty rows
« Reply #3 on: November 15, 2019, 10:40:00 am »
There is inbuilt support only for visual identification of dirty cells.

If you want to visually identify new rows, then may add a css class to new rows with addClass() API.

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

Also add css rule for that class.

Code: [Select]
.yourclasss{
  background: 'red'
}