|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGrid Nightmarea 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 º¿º 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 -- Show quoteHide quoteBest Regards The Inimitable Mr Newbie º¿º "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 º¿º > 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 º¿º >
Other interesting topics
Consuming less memory when writing a file?
run asp.net without a web server Web Projects in VS 2005 How to change LabelText in DataList Data Access Layer reading the session inside a Dll project using asp.net 1.1 Mouseover, mouseout, click etc on datagrid. About KB Article 831150 Bind DropDownList to XmlDataSource Application and Session state stored in SQL Server |
|||||||||||||||||||||||