Friday, March 16, 2012

Looping through rows in a DataGrid

Hi,

I have a data grid in my application. It has 20 rows and I
have set the page size as 5. I have a Submit button on my
form and when I click on Submit, I need to loop through
the rows in the datagrid. Using the items collection just
gives me the 5 rows that are displayed on the screen.
Is there any way of looping through all the rows in the
grid?

Thanks,
DivaDiva,

Instead of looping through the rows of the grid (which only contains five)
try looping through the dataset or datatable that's bound to it instead.

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Diva" <moonlight_diva_17uk@.yahoo.com> wrote in message
news:00c901c35207$3e3930d0$a401280a@.phx.gbl...
> Hi,
> I have a data grid in my application. It has 20 rows and I
> have set the page size as 5. I have a Submit button on my
> form and when I click on Submit, I need to loop through
> the rows in the datagrid. Using the items collection just
> gives me the 5 rows that are displayed on the screen.
> Is there any way of looping through all the rows in the
> grid?
> Thanks,
> Diva

0 comments:

Post a Comment