When looping through datable, I am inserting record to DB. At the same time, I am validating if data "Fedex Rep" from datatable exist in Representative table. If not, I want a Modal screen to pop up, with Gridview. This is for a user to select Representative name. Afterward, goes to the next row in datatable. I am not sure if possible.
I can use Modal popup with Gridview and allow user to select data from Gridview. How can I trigger Modal to popup while looping through datatable?
1. Loop through Datatable, get representative name ("Fedex Rep") and others values
2. validate if "Fedex Rep" exists in Representative table
- if Fedex Rep exists, insert data to ShipmentRequest table with other values
- if Fedex Rep not exists, pop up Modal ajax control, and allow user to select Rep name from Gridview
- insert to DB and continue looping