Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 27th, 2006, 02:12 AM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with updating the detailsview control


Here i ended up in very bad situation. i will try to explain the problem here. In our webapp development we are using detailsview controls to display one record. Mind it, that DetailsView control is not bounded to sqlDataSourse or else.. its DataSource is Dataset which is generated dynamically.

On the Edit i have added dropdowlists dynamically loading them from the database. it works fine. but the problem is. when i click on the update i cant see the just added dropdownlist in the Detailsview control. This is really wierd way of behaving.

Please i need help..
suggestion will be appriciated.

  #2 (permalink)  
Old August 2nd, 2006, 10:45 AM
Registered User
Join Date: Aug 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

You have to specify in the DetailsView control the Item events with something like this:

<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="AgentID"
            OnItemDeleted="Agency_ItemDeleted" ...

and then rebind your drop down list data in the events with your code with something like this:

protected void Agency_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
    protected void Agency_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
    protected void Agency_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)

Make sure you use the DetailsViewDeletedEventArgs so the item events will fire from the DetailsView control.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Events for Control Inside DetailsView AspNetGuy ASP.NET 3.5 Basics 3 June 6th, 2008 02:09 PM
DetailsView Control on ManageCategories.aspx pinch BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 6th, 2007 09:15 PM
DetailsView "Out of range" error when updating rsearing ASP.NET 2.0 Basics 16 August 17th, 2007 07:38 AM
detailsview not updating table when null column davej ASP.NET 2.0 Professional 3 April 11th, 2007 06:59 AM
DetailsView Control Showkkath ASP.NET 1.x and 2.0 Application Design 2 August 21st, 2006 07:49 AM

All times are GMT -4. The time now is 12:24 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.