GridView XmlDataSource


Ben Schumacher

On a webform I have a GridView control and an XmlDataSource control. I set
the datacontrolid of the gridview control to the id of the xmldatasource
control and everything looks fine. The xml looks somthing like below ...

<FolderReference type="Number" value="12345"/>

I also have two text boxes and a button on the webform so that the user can
add additional folder references to the grid. They simply type the values
in the two text boxes and click the add button. On the postback i build
another <FolderReference> node and append it to any existing reference in
the xml and ther set the property to the newly created
xml. Unfortunatly i never see the newly added row. I know the xml is
right. I can see the new xml structure with the two <FolderReference>
nodes, but I only see what was originally in the gridview control. It won't
re-bind itself to my new structure that is provide.

Any suggestions?





I wonder if the xmldatasource is caching. Test by turning it off and
running your scenario again.
myXds.EnableCaching = False


ps. I never thought about using xmldatasource with gridview.


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