Home All Groups Group Topic Archive Search About
Author
25 Nov 2005 2:38 PM
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 ?????/






--
Best Regards

The Inimitable Mr Newbie  º¿º

Author
25 Nov 2005 3:03 PM
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

--
Best Regards

The Inimitable Mr Newbie  º¿º
Show quoteHide quote
"Mr Newbie" <h***@now.com> wrote in message
news:uqJXX3c8FHA.3388@TK2MSFTNGP11.phx.gbl...
>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 ?????/
>
>
>
>
>
>
> --
> Best Regards
>
> The Inimitable Mr Newbie  º¿º
>
Are all your drivers up to date? click for free checkup

Author
25 Nov 2005 3:03 PM
S.M. Altaf [MVP]
When the update occurs, are the values being saved to the dataset in the
session variable as well?


--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com


Show quoteHide quote
"Mr Newbie" <h***@now.com> wrote in message
news:uqJXX3c8FHA.3388@TK2MSFTNGP11.phx.gbl...
>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 ?????/
>
>
>
>
>
>
> --
> Best Regards
>
> The Inimitable Mr Newbie  º¿º
>

Bookmark and Share