binding empty recordset to datagrid

R

RufusGoofus

I have a stored procedure that sometimes returns an empty recordset. The
invoking web page attempts to bind the recordset to a datagrid. If the
autogeneratecolumns property on the datagrid is set to TRUE, the databind()
call fails (when the recordset is empty). If I set the autogeneratecolumns
property to FALSE, the databind() call succeeds when the recordSet is empty.
Is there a way to overcome this, or is it simply a limitation when
autoGenerateColumns is set to TRUE ? In theory, it would seem that
information about the columns (such as the column names) could be
returned to the web page even if there are now rows in the recordSet; this
would be nice, since it would enable the web page to display the column
headings without any data rows.
 

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,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top