Detailsview itemupdating old values
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.| | Thanks, | | Jim | What the developer really needs is a way to specify that the Data Item property of the Detail View should be populated (with the data object) when the user presses an ordinary button so that a dataobject with the values currently on screen will be available in the event handler for that button click.The Data Item property is always always null, when I need it.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.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!Thanks, Steven Cheng Microsoft Online Support Get Secure! TK2MSFTNGXA03gbl | Xref: TK2MSFTNGXA01gbl microsoft.public.dotnet.framework.aspnet:129593 | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | What the developer really needs is a way to specify that the Data Item | property of the Detail View should be populated (with the data object) when | the user presses an ordinary button so that a dataobject with the values | currently on screen will be available in the event handler for that button | click. -------------------- | Thread-Topic: Details View and Object Data Source - how to get updated object | thread-index: Ac XKsv D0F u Hj QARQn K7Gt Rm1Ke QJA== | X-WBNR-Posting-Host: 22.214.171.124 | From: "=? The Data Item property is always always null, when I need it.