Author Topic: IsDirty red triangle not disappearing after commit  (Read 3999 times)

angelahlp

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
IsDirty red triangle not disappearing after commit
« on: March 10, 2014, 02:56:48 am »
I have finally got an add row to work but after the commit, the red triangles do not go away in the field corners. My code is:

$grid.pqGrid("commit", { type: 'add', rows: rows });

I also rollback:

$grid.pqGrid("rollback", { type: 'add' });

The new row stays in the first row of the grid with the red triangles still present...

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: IsDirty red triangle not disappearing after commit
« Reply #1 on: March 10, 2014, 09:17:27 am »
Please refer to this example. New row doesn't have red triangles even before the commit.

http://paramquery.com/pro/demos/editing


angelahlp

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: IsDirty red triangle not disappearing after commit
« Reply #2 on: March 10, 2014, 03:53:54 pm »
I have the grid set up so that it allows editing of all cells with an "Accept Changes" button. When a new row is created it has the red triangles... is there a way to get rid of them - remove the class or something?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: IsDirty red triangle not disappearing after commit
« Reply #3 on: March 10, 2014, 08:55:43 pm »
Even though triangles can be removed by css

.pq-grid td.pq-cell-dirty
{
  background: none;
}

but I'm still not sure how you ended up with triangles for add new rows. They are not supposed to be there.

Did you check the log of changes with the help of method: getChanges after adding a new row.

A small test case could be useful so that I can look into what's going on.