Re: Why Doesn't This Work?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



ADO.NET is my weakest point. If I'm not mistaken, your code would result in
an additional database hit--in addition to the original one that loaded the
grid data. Is that correct? That would definitely be a concern to me.

Yes it does. I doubt it's much of an overhead unless there is a lot of
data to load. However the alternative is to handle the databinding
manually. Retrieve the data and put it in a database table (in my
solution that means move the lines of code that do the db query into
the page_load event). Assign that table as the datasource for the
GridvVew, execute DataBind and then use the PreRender event as before.
The datatable will still be available and only one hit is required.

Anyway I guess we've done this to death now and I'm glad I was able to
help.

Good luck with your project.
.