Hi,
I have a grid which has two 'debit' 'credit' columns & I want to show the sum of these columns in my summaries. The issue I am facing is this that the sum is calculated only for the rows which are part of the grid's datasource or more specifically the rows which are loaded through DataSourcUrl, I have also allowed to Add New Rows to the grid, But the rows which are added through AddNewRows are not being calculated by the summaries. From what I know is that the summaries is only calculating the sum of rows which are committed & not the ones in the igTransactions.
What should be done to calculate the sum of normal rows(already-added(commited)) as well as those rows which are added later by the user through the "AddNewRow" button after the grid data is rendered. In simpler words How to calculate sum of already added rows as well as rows which are currently in 'igTransaction'.
Thanks.
Hello Zep lin,
Thank you for your reply.
As long as the commit method is called manually on rowAdded, the summaries should also be updated. If that is not the case, please feel free to send me a working sample for further investigation.
But with AutoCommit set to false, my Suammaries() feature will not work for newly added rows.
The autoCommit option adds separate transactions for the addition of a new row and its subsequent edit and delete, as otherwise there would be no way to track the different actions which have occurred while auto commit has been enabled. Therefore in this case I would suggest retaining aggregateTransactions (if the cases which it handles are approapriate for your needs), alongside manual commit. The commit method can then be manually called by handling the editRowEnded, rowAdded and rowDeleted events of the Updating feature.
Please let me know if this helps.
Basically I want the functionality of aggregateTransactions but I also want to set AutoCommit(true) because I need Summaries of newly added rows.
------------------------------------------------------------------------------
If set to true, the following behavior will take place: if a new row is added, and then deleted, there will be no transaction added to the log if a new row is added, edited, then deleted, there will be no transaction added to the log if several edits are made to a row or an individual cell, this should result in a single transaction Note: This option takes effect only when autoCommit is set to false.
Although summaries are working now, but AutoCommit = true has made several other issues for me.
Earlier if I added a new row and pressed OK button & then again double clicked on that newly added row and edited values of that row, I only got one transaction of type "newrow", NOW because AutoCommit is true , I get several transactions for the same row, I get "newrow", "row" , "cell" in igtransactions for the same row with RowId = 1.
It is going to be problem for me when get these on the server, How would i know which one is the latest one. Isnt there any way to restrict this behavior of igGrid and get only one latest transaction pertaining to the same RowId. If I set AutoCommit = false then my Summaries are not working. Is there a workaround for this?
Can I set some options in the grid so that if I use igGridUpdating() , the same transaction is overwritten with the new values without making individual transactions for cell, row , newrow etc.
Please reply,