GridView XmlDataSource

B

Ben Schumacher

Ok. I have a .ascx with a gridview control and xmldatasource control. In
the page_load event of the form that has the .ascx control on it, I set the
data property of the xmldatasource and then the gridview displays fine.
Sometimes I will not know or have any data to pass into the .data property
of the xmldatasource control property because the user has not add a value
into the grid yet. In this case, I would like the gridview control to as
least render with it's headers and no rows as an empty grid, but when I do
not pass an xml value into the .data property of the xmldatasource my page
blows up. I'm getting some sort of object required error. How can easily
initialze the grid to display empty where there is no data in the
xmldatasource?
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top