473,406 Members | 2,259 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,406 software developers and data experts.

Updating Disconnected DataSets with GridView

ist
Hi,
I am trying to create a Session-Wide, Disconnected, Updatable
DataTable (or DataSet) object and use it through an ASP.NET GridView.

The scenario is this:

1. When the page is first loaded, connect to DB, get data, fill
DataTable.
2. Bind DataTable to GridView. Set DataTable as a Session object.
3. User continues navigating page, but after first load, no more DB
connection is made, grid is filled from DataTable Session object.
4. Sometime, user sets GridView to edit mode and makes some changes.
Then he clicks Update button on GridView.

This is where I fail. I somehow imagine that there must be a way to
reflect user's change on Gridview to DataTable Session object (NOT to
actual DB)

So when user continues navigating page, he will see updated data
(since DataTable is Session-wide) however the actual DB is not
updated.

I've tried triggering GridView1.UpdateRow(e.RowIndex, false) on
GridView1_RowUpdating event but it gives me stack overflow (huh?)
error.

Thanks...

Mar 22 '07 #1
1 3601
I've tried triggering GridView1.UpdateRow(e.RowIndex, false) on
GridView1_RowUpdating event but it gives me stack overflow (huh?)
error.
It is supposed to overflow because of recursive callback (UpdateRow
itself raises RowUpdating event, from where it is getting called
again).

In any case GridView's automatic row update is intended for
DataSourceControl (i.e. the one set by by DataSourceID instead of
DataSource). Your best bet is probably to manually update the table
stored in Session state in RowUpdating or RowCommand event.

Mar 23 '07 #2

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

Similar topics

1
by: Andrew | last post by:
I'm a long time VB6/ADO and Java developer new to ADO.NET. I'm trying to decide on best practices and I'd appreciate any assistance. I have one specific question and another more general...
4
by: enrique | last post by:
Hi, I apologize for a newbie question, but my books/research have yielded me no examples and my time is now short. I simply want to update data from text boxes (fields). I'm not using a datagrid...
3
by: | last post by:
Hello, I have created an ASP.NET 2.0 application that utilized a Gridview Control to display and update/delete data. The problem I am having is that the gridview control is displaying the data...
10
by: Rich | last post by:
Hello, I have to read and write around one million records from an external data source to Sql Server2k every night. That's a lot of I/O. I am using VB6 for this (takes hours). I am...
2
by: Commander Ace | last post by:
Hi, I'm having some problems with updating an SQL Database with modified fields from a datatable. I got the code from a Wrox book, 'Professional VB.NET 2003', the same code can be found here:...
0
by: garethdjames | last post by:
For scalability we wish to use disconnected DataSets and hold them in the application cache. This means that multiple concurrent users will be reading the data (its read only) The DataSet is...
9
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
12
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.