My page has a gridview that edits data without using DetailsView or FormView.
The issue occurs on postback.
I am using this code to rebind my gridview after the user changes the row(where mdt is a datatable). This allows me to save the "bulk edit" updates to a datatable which is then saved in ViewState.
gvMoveDetails.DataSourceID = String.Empty
gvMoveDetails.DataSource = New DataView(mdt)
Here is my problem.
The first time this code runs on a postback, it works fine.
But the 2nd time it does not.
The data for the fields that are not visible is not there anymore.
Before that code is run, I know for sure all the data is in mdt. But as soon as databind is executed, the fields that are not visible to the browser can no longer be accessed in the code behind.
Note that I am not setting the visibility in the code behind. instead, I am using css:
Please help me! I have spent sooo much time on this and am sooo very frustrated!