Search code examples
oracle-databaseoracle-apex-5oracle-apex-5.1

Oracle Apex - How to check if all rows of an interactive grid have been deleted?


I would like to know how to check if all the rows of an interactive grid have been deleted.

Is there a way to check that programmatically?


Solution

  • I got an answer to this,hope this helps for those who are in need.
    Fetch your grid info :
     var igrid = apex.region ("regionStaticID").widget().interactiveGrid("getViews", "grid");
    
    {where regionStaticID is the interactive grid static id}
    
    if(igridL.model._numInsertedRecords === 0)
        {
                       // do whatever you want here when there are no rows in the grid
        }