Welcome Guest Search | Active Topics | Sign In | Register

gridview getting checked off items Options
sarad1978
Posted: Friday, October 1, 2010 9:25:19 AM
Rank: Member
Groups: Member

Joined: 11/25/2008
Posts: 22
I'm using the gridview control and i have about 10 columns to loop through to see if the cells are checked off. My code works for the first column only and when i check off items in column 2 and debug it the function for the grid "checkeditems" has 0 for a value but they are definately checked off. I'm not sure what i'm doing wrong since it does work for the first checkbox column in the grid.

Code: C#
this is what i'm using to loop through the grid. 

 foreach (EO.Web.GridColumn column in Grid1.Columns)
        {
            foreach (GridItem item in Grid1.CheckedItems)
            {
                   foreach (GridCell cell in item.Cells)
                      {
                 
                      //do stuff
                      }
             }
          }
}
eo_support
Posted: Friday, October 1, 2010 10:02:32 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Hi,

This is normal. Grid.CheckedItems only checks the first CheckBoxColumn. For other columns, you will need to loop through all the items to check the cell yourself.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.