Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   Loop through multiple Datagrids on page (http://www.velocityreviews.com/forums/t762125-loop-through-multiple-datagrids-on-page.html)

chuckdfoster 07-01-2005 03:32 PM

Loop through multiple Datagrids on page
 
I have 4 datagrids (dg1, dg2, dg3, and dg4) on a webpage. I know how to
loop through the rows in each individual datagrid, but I need to loop
through all 4. Is there a way to loop through the controls on the page,
determine if it is a datagrid or not, then I can continue my loops? I have
tried using Page.Controls, but that only gives me the "literals." Any
suggestions? Code Samples would be great help.

Thanks in advance for any shared knowledge!
--
Chuck Foster
Programmer Analyst
Eclipsys Corporation - St. Vincent Health System



Teemu Keiski 07-01-2005 05:36 PM

Re: Loop through multiple Datagrids on page
 
Hi,

yes it is, it just need recursive approach (to note that controls can
contain another controls and so on). Check this:

Loop through all or certain type of controls on the ASP.NET Page
http://www.aspnet101.com/aspnet101/tips.aspx?id=97


--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke




All times are GMT. The time now is 05:12 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57