Avatar of VBdotnet2005
VBdotnet2005
Flag for United States of America asked on

Loop datatable

On my page, when a user click submit, I am looping through datatable. One of the columns is called business representative. Sample
Steve Young. I also check if his name exists on DB. If he not not exist, I want to display and have a user select from a gridview inside Modal. Onces it is selected, how can I make Foreach loop continue to the next row? Or if even possible?

Foreach


   etc..
   if Steve young does not exits then
      modal.show                    
        select Representative name
        and insert data to dbtablesample
   end if
   continue looping to the next row


next
ASP.NET

Avatar of undefined
Last Comment
GlobaLevel

8/22/2022 - Mon
GlobaLevel

this?


Dim rowRunData As System.Data.DataRow
Dim ProjectData = New System.Data.DataTable()

 And Ive put the various data in the datatable.... so my code for looping I thought would be....

For Each rowRunData In ProjectData.rows
       DoStuff()
Next

But with this
VBdotnet2005

ASKER
For Each rowRunData In ProjectData.rows
       DoStuff()  <<< I want to display Modal extender ajax if Representative name does not exists(see my comment above)
                      inside Modal I have a gridview. I want a user to select Representative  first(I can do this no problem)
                  then I need it to continue looping afterward      
                   
Next
GlobaLevel

okay without seeing more code...

I think you have this covered..but..
http://blog.dreamlabsolutions.com/post/2008/11/11/ModalPopupExtender-in-a-GridView-sample.aspx

Dont forget Windows is event driven ,you need to have that event handled in your code behind:


Protected Sub modal_oncheck(subject s as sender, event e as event args) handles button1.click ' whatever youwant here..
For Each rowRunData In ProjectData.rows
       DoStuff()  <<< I want to display Modal extender ajax if ...      
                   
Next

End sub


Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
GlobaLevel

Protected Sub modal_oncheck(subject s as sender, event e as event args) handles button1.click ' whatever youwant here..intellisens will guide you..For Each rowRunData In ProjectData.rows
       DoStuff()  <<< I want to display Modal extender ajax if ...      
                   
Next

End sub

ASKER CERTIFIED SOLUTION
GlobaLevel

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
GlobaLevel

this was a section from the link above..