Mar 24, 2008 08:03 PM|Michael.Shorten|LINK
Well, I dug through the code and you're not going to like the answer.
The bottom line is that I could never find a way of doing it through one call to my stored proc. So, what I do is in PageInit, I call a method called BuildColumnsDynamically. I basically call the stored proc, get the first row back, loop through the columns,
get the number and type, build my grid that way. That's basically the approach I took.
I should also note that my grid was bound to a datasource, so this approach worked for that situation. I should also note that I did this every time the page was called, whether post back or not. Some caching of the result set would eliminate the constant
call db/build grid approach, but either way, you have to reubuild on each page load.
Probably not what you wanted to hear, but there it is.