![]() |
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 |
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.