473,387 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1077
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_********@poczta.onet.plnapisał 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
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
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...
1
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...
0
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...
1
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...
3
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
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...
7
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...
0
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"...
0
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.