The DataGrid and His Enemy the Dataview

I was working a SPDataGridView Webpart today.  I was trying to get the grid to refresh and re-bind itself after a specific client was deleted in the web part.  When I tried to clear the grid it would not clear at all.  It would refresh with the exact same data, until I hit F5 on Internet Explorer.  I finally thought to myself what if I get rid of the Dataview as a source and call the DataSet directly.  Sure enough I change it and clear the DataSet, then rebind and grid and when I delete the client it refreshes without the deleted item.  So what is the purpose of a DataView?  I'm really not sure, but I will be finding out in the future.  It seems a little bit extra to bind a grid to two separate objects when one will do.

Print | posted on Tuesday, March 11, 2008 1:33 PM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © MOSSLover

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski