Results 1 to 2 of 2

Thread: 30 datagrids in a cicle

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Posts
    6

    30 datagrids in a cicle

    hello to all,

    sorry for my english, I'm italian.

    I have 30 datagrids, how can I call them in a cicle using their ID?
    (to not write so much code)

    Thanks,
    Pileggi
    Pileggi

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    PHP Code:
    foreach(Control ctrl in this.Controls)
    {
        if (
    ctrl.GetType() = typeof(DataGrid))
        {
            
    DataGrid dg = (DataGrid)ctrl;
            
    //....do whatever you want with your grid here
        
    }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width