简体   繁体   中英

How calculate summary of IG rows dynamically at runtime

I am using APEX 23.1. I have an Interactive Grid which is based on a table(item_id, price). I need to calculate the summary of price IG column whenever a price of any item in the grid changes. And I want to be able to make use of that calculated summary value in other calculations and code. For example, if there's 2 rows with prices 1 and 2, then I need an item beneath that column to display 3. if price 1 changes to 2, then it should display 4, and so on. As you already know, this can be done through “Aggregation” functionality through “Actions” menu. But then it won't run the calculation unless the page is submitted. John snyders wrote an article about accomplishing that through listening to the model using a long script. I think it was about version 19. But I remember he commented on some thread about this subject with a JavaScript initialization code of IG columns that could do the sum of the column too. I'd appreciate if you can direct me to that code to a better solution.

I also remember that the JavaScript initialization code can not be of much help if one need to use the summary value displayed, but not sure about that. But, that's something I need.

Just try this below Add row using Dynamic action javascript along with Summary script into that javascript.

https://github.com/mgoricki/orclapex-ig-cheat-sheet#auto-add-row

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM