how to loop into grid

May 26 2015 4:42 AM
hi,

I am a newbie learning c#, I stuck in looping into my grid,

plz help me to learn how to loop into grid.

here I have two column from grid and I have to loop to get the name and status from my grid

foreach (GridViewRow row in GridView1.Rows)
            {
               string Name;
               string enabled;
               Name = row.Cells[2].Text ;
               enabled = row.Cells[3].Text ;
            }
            
             For i = 0  row.Cells.Count - 1
           

 

            if (enabled=="0")
                {


Answers (2)