DataGrid Nightmare

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 ?????/
 
M

Mr Newbie

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
 
S

S.M. Altaf [MVP]

When the update occurs, are the values being saved to the dataset in the
session variable as well?
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top