473,796 Members | 2,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GridView transferring changes at end-of-edit

Hi,
I am learning ASP.NET and I need to have an Excel-like sheet of records from
database. Users may modify data in the sheet. I thought about using GridView
with DataSource but the problem is that the changes should be transferred to
database not when record is modified but when separate button is clicked
(then a transaction with inserts/updates/deletes should be performed). As I
understand database commands of DataSource are executed when records are
modified.
Do you know any good ideas? I think about storing (using DataSource
commands) changes in temporal table and then transferring changes to main
database table when button is pressed, but I don't know if it's a good
solution because implementation will be rather complicated as I guess.
/RAM/
Dec 20 '06 #1
1 1103
What do you think about this:

In InsertCommand I insert into temporal table #i
in UpdateCommand I insert into temporal table #u
in DeleteCommand I insert into temportal table #d
in SelectCommand I select from main table t and temporal tables:
( select * from t
union
select * from #i
except
select * from #d
union
select * from #u )
except
( select key from t
intersect
select key from #u ) .
On button click I transfer from temporal tables to main table t.

Użytkownik "R.A.M." <r_********@poc zta.onet.plnapi sał w wiadomo¶ci
news:em******** **@news.onet.pl ...
I think about storing (using DataSource commands) changes in temporal
table and then transferring changes to main database table when button is
pressed, but I don't know if it's a good solution because implementation
will be rather complicated as I guess.

Dec 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1564
by: placebo137 | last post by:
Hi I have a sql query that Groups the data like so: YEAR WHS Here's the query SELECT TOP 100 PERCENT YEAR() AS Year, , SUM() AS Sales FROM dbo. GROUP BY YEAR(),
0
855
by: needin4mation | last post by:
Hi, I have a gridview. I have a dropdown. When the dropdownlist changes the datasource in the gridview looks for the dropdownlist value and changes according. What if I want an either/or situation? I also want a textbox on the same form with a button. If the user puts data in the textbox and clicks search that same gridview populates based upon the value. But how do I put them on the same page with the same gridview?
1
7806
by: postings | last post by:
Hi I have problems with autopostback and the gridview control. Please continue reading. The code below turns a row red when a tickbox is ticked in edititemtemplate. Note autopostback on the tickbox is enabled and the code works perfectly. -------------------------------------------------------------------------------------------------------------------
0
1029
by: Mile777 | last post by:
Hi! I've made a webservice that searches an access database and returns results. I would like to copy that results into a gridview but don't know how. I've seen that gridview uses another database as datasoure but I think it is stupid to build a "cache" database just for transferring data. So, any help is very welcomed:) Thx
1
1891
by: kashif456 | last post by:
I can't figure out why I am getting error updating, deleting and inserting new rows. I am amble to get my dataview populated and also detailview populated: Here's my code: <%@ Page Language=VB CompilationMode=Auto Inherits=CrisisResponseBase %> <script runat="server"> 'Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
3
2192
by: Marc Grutte | last post by:
Hi I am trying to bind a custom datasource to a gridview whilst paging is enabled. What is missing in this code to make the paging + binding work? thanks M <%@ Page Language="VB" %>
3
2264
by: =?Utf-8?B?c2hhcnJpczEyMzQ1?= | last post by:
Hi, I have a GridView that has one column that I fill with an alternating "Title Row" then "Details Row". The Title row has a button that I use to hide it's corresponding details row that is underneath it for users to collapse detail rows leaving the title row visible. The button can be clicked again to show the details. This used to work great using a DataGrid but when I upgraded it to a GridView I experience the following problem:
7
17320
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi all! I have a gridview inside a datagrid (nested) for which (gridview) the rowcommand is not raised in order to delete a row from the grid! I also tried OnRowCommand="method", didn't work either! Does anyone know how can I make this work? Thanks in advance!
0
1170
by: teejayem | last post by:
I am new to asp.net. I have a grid view that is bound to a dataview. I have used a small javascript to select the rows in the gridview see below:- <script language="javascript" type="text/javascript"> var oldgridSelectedColor;
0
691
OuTCasT
by: OuTCasT | last post by:
How would i go about transferring data from a gridview on one page to a datalist on another page.?
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10012
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.