Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 10-22-2006, 02:01 PM   #1
Default DetailsView (Insert, Update, Delete)


Hi,

I would like to know if anyone had tried insert, update, delete of data through DetailsView control in a datatable (not in the datasource directly using the dataadapter Or the datasourcecontrol). Whenever I click any of the command buttons (Insert, ..,....) the data should get inserted, updated Or deleted in the datatable (which is in memory locally) not in the datasource physically(sql server). And later whenever I'm finished with all the invoice lines (many records) I will update it using the dataadapter's update command OR using the datasourcecontrol (which is available with detailsview). And my insert, update & delete commands in the datatable locally will be through manual coding by using datatable.newrow & fill the data in the columns of the row & then finally datatable.rows.add(newrow).

The problem what I'm facing is, when I'm inserting data into the datatable by clicking the 'insert command' (itemcommand event), the data gets updated in the datatable but the DetailsView control doesn't change to 'readonly' mode bcoz the defaultmode is readonly mode (even if I force it to change it to readonly despite of having more than 0 recordcount). It also fires modechanging event but it doesn't fire the 'modechanged event'. I'm struggling for it for quite a long time. The reason for doing is that first I'll fill all the invoice lines in my InvoiceDetails(footer) table then I'll fill one record in my invoiceHeader(header) table then when both tables are ready I'll update the datasource.

Note: If my invoicedetails datatable is empty under that case I'll show a command button (emptydatatemplate), which once clicked shows the grid in 'insert mode'. This is for first time only when the recordcount is 0.

Any help is really appreciated.

bye.........
AZEEM.


azeem
azeem is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't delete file or folder? nork Software 1 11-02-2009 11:52 AM
Update and Delete From Gridview Usman Software 0 11-01-2006 10:05 AM
How do I: Correctly deny the delete permission? sundevilkid85 Software 0 05-08-2006 09:49 PM
Re: Question about MS critical updates John Coode A+ Certification 0 06-30-2004 06:08 PM
Latest Tech Fiasco... Ghost A+ Certification 30 01-09-2004 12:15 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46