Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gridview row index problem

0 views
Skip to first unread message

André Freitas

unread,
Jun 29, 2009, 8:53:36 PM6/29/09
to
i got a gridview with multiple headers. i put the multiple header in the
onprerender method.
the same gridview have a template field with a checkbox inside.

im getting the status of the checkbox by a loop for eachgridview row, from 0
to rows.count - 1.
im getting the status fine, but when i trie to get some field in that row,
he returnes the data from the row assuming that i have not inserted any
mutiple headers.

something like this:

name checkbox
a false
header inseted onprerender
b false
c true

im geting the check true, but when i try to get the name field, he is
returning the b field.
i do realize whats going on, but i have no idea how to solve this.


-----------------------------------------------------------------------------
Less Spam Better enjoyable experience
Visit : news://spacesst.com

Mark Rae [MVP]

unread,
Jun 30, 2009, 5:59:59 AM6/30/09
to
"Andr� Freitas" <thev...@uol.com.br> wrote in message
news:e4TM10R%23JHA...@TK2MSFTNGP02.phx.gbl...

> I'm getting the status of the checkbox by a loop foreach GridView row,
> from 0 to Rows.Count - 1.
>
> I have no idea how to solve this.

A post like this is almost impossible to solve for one simple reason - you
have not shown your code!

When asking for help like this in a technical newsgroup, it's REALLY
important to provide as much relevant information as you can.

Also, this is not really a general framework question. By the sound of it,
it's ASP.NET, so you would probably get a better and quicker response by
posting in: microsoft.public.dotnet.framework.aspnet

That said, it sounds like you're not checking the row type in the foreach
loop?

But, without seeing your code, it's impossible to tell...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

0 new messages