Detailsview itemupdating old values
In addition to saving the developer from constructing a data object from a collection of new values, this would enable the developer to store the object in the session, which is not availble in the select and update methods of the data object.Also, it would permit a more intuitive UI because buttons would not have to be in the Detail View except when that makes sense.If Auto Generate Rows is true, then the order of the fields seems random and thus how could they be mapped to each dvr. This is still easier than a UI that uses no data binding at all, but it seems like it would have been pretty easy for MS to have eliminated the need to write and maintain these additional 40 lines of code."Steven Cheng[MSFT]" wrote: Thanks for your response Jim, Yes ,the Date Item is used during the Data Binding period, after that , in the sequential page reuqest, it's null. Text which stored the current record's certain fields values.So for your scenario, I think we can set the Details View's default mode to edit, use autogeneratedrows , then we can call Details View. US, VS.80)BTW, as for the the limitation you mentioned, I do agree that some of them are reasonable such as make programmatical update/edit... If using the buildin update command of the datasource is ok, you can ignore the itemupdating event.Update Item in a certain postback button which is outside the details View control. more convenient and provide a more easy to use inteface to access the binded data from Details View (or other single databinding control as Form View). Also, as for the following thread you mentioned: seems they're discussing on the Object DAta Source's updating event. TK2MSFTNGXA 03gbl | Xref: TK2MSFTNGXA02gbl microsoft.public.dotnet.framework.aspnet:350002 | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | According to the the link you provided, it sounds like calling | Details View.| | In addition to saving the developer from constructing a data object from a | collection of new values, this would enable the developer to store the object | in the session, which is not availble in the select and update methods of the | data object.Also, it would permit a more intuitive UI because buttons would | not have to be in the Detail View except when that makes sense. If I use databinding, set Auto Generate Rows to true, pass the dataobject as the only parameter to the update method, and do all of my processing when the user presses the auto generated Update button, then I only have to write about 5 lines of code to implement a web UI.
(This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | Thread-Topic: Details View and Object Data Source - how to get updated object | thread-index: Ac XI V3y M7Jnzt0DTLa RAv FSe Syfu Q== | X-WBNR-Posting-Host: 126.96.36.199 | From: "=? | | I can get the updated object if I set Update Method, let ASP.And if you don't want to use the buildin edit/update/cancel button, of course we can use our own buttons, we can add a custom field and put our own submit or linkbutton in it.But we need to set the proper command Name for them such as "Edit", "Update", "Cancel" ... =" | MIME-Version: 1.0 | Content-Type: text/plain; | charset="Utf-8" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Content-Class: urn:content-classes:message | Importance: normal | Priority: normal | X-Mime OLE: Produced By Microsoft Mime OLE V6.00.3790.0 | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: TK2MSFTNGXA03gbl 10.40.2.250 | Path: TK2MSFTNGXA01gbl!NET autogenerate | an update button, and then press update after making changes, but I don't | want that update button.| | How can I get the updated object when the user presses one of my other | action buttons?