[thelist] How to empty a gridview in 2.0

Casey Crookston caseyc at IntelliSoftmn.com
Fri Apr 20 13:51:48 CDT 2007

>>What exactly are you attempting to do that needs the Datagrid "reset"?

Was doing some user testing... There is a page on which users record
transactions.  Each transaction has multiple line items. Each time a new
line item is entered, it is added to the db and the gridview is re-bound
so it shows up on the page immediately. 

When the user has entered all transactions, they are supposed to click
on the "Start New Transaction" button I provided which clears all
ViewState values and re-directs back to the same page. Doing this
re-direct accomplished the goal of clearing the datagrid.

However, instead of clicking on the "Start New Transaction" button, the
user tends to click on the link for the page she is already on. When she
does this, the rows in the gridview are maintained, and as she enters
line items for a new transaction, the gridview shows old data until she
enters a second line on the new transaction.

So, I need a way, when the user clicks onto the page, to clear any data
that might be in the datagrid.

Hope this makes sense.


More information about the thelist mailing list