DataGrid Nightmare

  • Thread starter Thread starter Mr Newbie
  • Start date Start date
M

Mr Newbie

I am trying to use the in place edit in Datagrid, however, I am experiencing
a problem which probably has a simple solutions so I thought I would ask you
guys.

I have a Grid bound to a DataSet table which works OK, I have an Edit column
in which the Edit links appear. In the Edit Event, I change the Grids
EditIndex Prperty to the row which I click using the e.item.editindex
property. OK

Now I have some text boxes in the row I want to edit. So lets say my text is
"Of all the fishes". I change the text to just "Fishes" and hit the update
button.

The update event fires , but the text returned is the original text not the
new text. I use Ctype(e.item.cells(4).Controls(0).text,textbox).text


In my page load, I have something like this.

If Not Postback then
get the dataset and then save it to session

Else

get it from session

End If

datagrid1.datasource = mydataset
databind.


Any ideas ?????/
 
Dont worry, I fixed it. I realised that binding it in the load event seems
to throw away any viewstate changes. I bound it in the pre-render event and
that seems to be OK
 
When the update occurs, are the values being saved to the dataset in the
session variable as well?
 
Back
Top