GridView RowCreated Handler Issues

B

bigbrorpi

I'm having a problem with a Gridview bound to an objectdatasource. I've
created a handler for onRowCreated with something as simple as:

msgbox(e.row.cells(1).text)

When the page loads, I see all of the data rows from my datasource, but
the e.row.cells(1).text comes up blank for every row except the header
and footer.

Does anybody see what I might be missing here?

Thanks
 
J

Jeff Dillon

Well, for one thing, you can't use msgbox, it's on the server!

Perhaps you meant response.write

What does the data look like coming from the datasource? Is it a SQL query?
What does the query return in Query Analyzer, if so

Jeff
 
Joined
Oct 25, 2007
Messages
1
Reaction score
0
GridView Problem

I think you may have added a handler to RowCreated, which is only fired when the header and footer are created.
But if you are data binding you need to add a handler to RowDataBound, which is fired for every row as it is bound.

Xopher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top