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

Batch updates with GridView

Hi. GridView's inbuilt capability to edit/update individual rows, one at a
time, is useful but inadequate for a scenario we currently face. I want the
user to be able to change values in multiple rows of the GridView and then
hit an "OK" button which then applies all the changes together as a single
unit. I also need the GridView to support paging; such that a user makes a
change in one page, navigates to another, nagivates back again and finds
that their original edit is still preserved, yet, not commited to the
database. Only when they hit "OK" will their changes on each of the GridView
pages be committed.

Are there any examples available that demonstrate this capability? I have
made a good start but would like to base my work on something already
proven. Challenges I currently face are; where to store the edits that the
user has made (in view state/code behind/session state), in what form to
store those edits (in a table class, an array etc.). I have figured out I
need to use a template column to show edit boxes on GridView. But another
challenge is then referencing the values in those edit boxes in the code
behind. Also, where to store the IDs of the rows, in hidden text boxes?

Any help/pointers much appreciated!!!!

--
McGeeky
http://mcgeeky.blogspot.com

May 9 '07 #1
6 2616
load a dataset with the data and store in session. then bind/page the
gridview to the dataset. when the user hit ok, use an adapter to update
the database from the dataset. lots of examples of using disconnected
datasets.

-- bruce (sqlwork.com)

McGeeky wrote:
Hi. GridView's inbuilt capability to edit/update individual rows, one at a
time, is useful but inadequate for a scenario we currently face. I want the
user to be able to change values in multiple rows of the GridView and then
hit an "OK" button which then applies all the changes together as a single
unit. I also need the GridView to support paging; such that a user makes a
change in one page, navigates to another, nagivates back again and finds
that their original edit is still preserved, yet, not commited to the
database. Only when they hit "OK" will their changes on each of the GridView
pages be committed.

Are there any examples available that demonstrate this capability? I have
made a good start but would like to base my work on something already
proven. Challenges I currently face are; where to store the edits that the
user has made (in view state/code behind/session state), in what form to
store those edits (in a table class, an array etc.). I have figured out I
need to use a template column to show edit boxes on GridView. But another
challenge is then referencing the values in those edit boxes in the code
behind. Also, where to store the IDs of the rows, in hidden text boxes?

Any help/pointers much appreciated!!!!

--
McGeeky
http://mcgeeky.blogspot.com
May 9 '07 #2
Thanks so much for that.

--
McGeeky
http://mcgeeky.blogspot.com
"bruce barker" <no****@nospam.comwrote in message
news:Ow**************@TK2MSFTNGP04.phx.gbl...
load a dataset with the data and store in session. then bind/page the
gridview to the dataset. when the user hit ok, use an adapter to update
the database from the dataset. lots of examples of using disconnected
datasets.

-- bruce (sqlwork.com)

McGeeky wrote:
Hi. GridView's inbuilt capability to edit/update individual rows, one at
a
time, is useful but inadequate for a scenario we currently face. I want
the
user to be able to change values in multiple rows of the GridView and
then
hit an "OK" button which then applies all the changes together as a
single
unit. I also need the GridView to support paging; such that a user makes
a
change in one page, navigates to another, nagivates back again and finds
that their original edit is still preserved, yet, not commited to the
database. Only when they hit "OK" will their changes on each of the
GridView
pages be committed.

Are there any examples available that demonstrate this capability? I
have
made a good start but would like to base my work on something already
proven. Challenges I currently face are; where to store the edits that
the
user has made (in view state/code behind/session state), in what form to
store those edits (in a table class, an array etc.). I have figured out
I
need to use a template column to show edit boxes on GridView. But
another
challenge is then referencing the values in those edit boxes in the code
behind. Also, where to store the IDs of the rows, in hidden text boxes?

Any help/pointers much appreciated!!!!

--
McGeeky
http://mcgeeky.blogspot.com


May 10 '07 #3
AG
Check out this project. It contains a bulk edit gridview.
http://www.codeplex.com/ASPNetRealWorldContr
--

AG
Email: discuss at adhdata dot com

"McGeeky" <an**@anon.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hi. GridView's inbuilt capability to edit/update individual rows, one at a
time, is useful but inadequate for a scenario we currently face. I want
the
user to be able to change values in multiple rows of the GridView and then
hit an "OK" button which then applies all the changes together as a single
unit. I also need the GridView to support paging; such that a user makes a
change in one page, navigates to another, nagivates back again and finds
that their original edit is still preserved, yet, not commited to the
database. Only when they hit "OK" will their changes on each of the
GridView
pages be committed.

Are there any examples available that demonstrate this capability? I have
made a good start but would like to base my work on something already
proven. Challenges I currently face are; where to store the edits that the
user has made (in view state/code behind/session state), in what form to
store those edits (in a table class, an array etc.). I have figured out I
need to use a template column to show edit boxes on GridView. But another
challenge is then referencing the values in those edit boxes in the code
behind. Also, where to store the IDs of the rows, in hidden text boxes?

Any help/pointers much appreciated!!!!

--
McGeeky
http://mcgeeky.blogspot.com

May 10 '07 #4
Thanks!

--
McGeeky
http://mcgeeky.blogspot.com
"AG" <NO**********@newsgroups.nospamwrote in message
news:#z**************@TK2MSFTNGP02.phx.gbl...
Check out this project. It contains a bulk edit gridview.
http://www.codeplex.com/ASPNetRealWorldContr
--

AG
Email: discuss at adhdata dot com

"McGeeky" <an**@anon.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hi. GridView's inbuilt capability to edit/update individual rows, one at
a
time, is useful but inadequate for a scenario we currently face. I want
the
user to be able to change values in multiple rows of the GridView and
then
hit an "OK" button which then applies all the changes together as a
single
unit. I also need the GridView to support paging; such that a user makes
a
change in one page, navigates to another, nagivates back again and finds
that their original edit is still preserved, yet, not commited to the
database. Only when they hit "OK" will their changes on each of the
GridView
pages be committed.

Are there any examples available that demonstrate this capability? I
have
made a good start but would like to base my work on something already
proven. Challenges I currently face are; where to store the edits that
the
user has made (in view state/code behind/session state), in what form to
store those edits (in a table class, an array etc.). I have figured out
I
need to use a template column to show edit boxes on GridView. But
another
challenge is then referencing the values in those edit boxes in the code
behind. Also, where to store the IDs of the rows, in hidden text boxes?

Any help/pointers much appreciated!!!!

--
McGeeky
http://mcgeeky.blogspot.com



May 11 '07 #5
Strange... there is no way to download the source code for it.

--
McGeeky
http://mcgeeky.blogspot.com
"McGeeky" <an**@anon.comwrote in message
news:ea**************@TK2MSFTNGP03.phx.gbl...
Thanks!

--
McGeeky
http://mcgeeky.blogspot.com
"AG" <NO**********@newsgroups.nospamwrote in message
news:#z**************@TK2MSFTNGP02.phx.gbl...
Check out this project. It contains a bulk edit gridview.
http://www.codeplex.com/ASPNetRealWorldContr
--

AG
Email: discuss at adhdata dot com

"McGeeky" <an**@anon.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hi. GridView's inbuilt capability to edit/update individual rows, one
at
a
time, is useful but inadequate for a scenario we currently face. I
want
the
user to be able to change values in multiple rows of the GridView and
then
hit an "OK" button which then applies all the changes together as a
single
unit. I also need the GridView to support paging; such that a user
makes
a
change in one page, navigates to another, nagivates back again and
finds
that their original edit is still preserved, yet, not commited to the
database. Only when they hit "OK" will their changes on each of the
GridView
pages be committed.
>
Are there any examples available that demonstrate this capability? I
have
made a good start but would like to base my work on something already
proven. Challenges I currently face are; where to store the edits that
the
user has made (in view state/code behind/session state), in what form
to
store those edits (in a table class, an array etc.). I have figured
out
I
need to use a template column to show edit boxes on GridView. But
another
challenge is then referencing the values in those edit boxes in the
code
behind. Also, where to store the IDs of the rows, in hidden text
boxes?
>
Any help/pointers much appreciated!!!!
>
--
McGeeky
http://mcgeeky.blogspot.com
>
>
>


May 11 '07 #6
AG
I know and have posted that fact several times there, but no one replies.
However, you can download the dll from the Releases tab and it works.
I think I had a problem with the naming of the dll vs the reference, but
once I fixed that, it worked fine.

Here is the link to where I originally found out about it.
http://blogs.msdn.com/mattdotson/articles/490868.aspx

--

AG
Email: discuss at adhdata dot com

"McGeeky" <an**@anon.comwrote in message
news:eQ**************@TK2MSFTNGP06.phx.gbl...
Strange... there is no way to download the source code for it.

--
McGeeky
http://mcgeeky.blogspot.com
"McGeeky" <an**@anon.comwrote in message
news:ea**************@TK2MSFTNGP03.phx.gbl...
>Thanks!

--
McGeeky
http://mcgeeky.blogspot.com
"AG" <NO**********@newsgroups.nospamwrote in message
news:#z**************@TK2MSFTNGP02.phx.gbl...
Check out this project. It contains a bulk edit gridview.
http://www.codeplex.com/ASPNetRealWorldContr
--

AG
Email: discuss at adhdata dot com

"McGeeky" <an**@anon.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hi. GridView's inbuilt capability to edit/update individual rows, one
at
>a
time, is useful but inadequate for a scenario we currently face. I
want
the
user to be able to change values in multiple rows of the GridView and
then
hit an "OK" button which then applies all the changes together as a
single
unit. I also need the GridView to support paging; such that a user
makes
>a
change in one page, navigates to another, nagivates back again and
finds
that their original edit is still preserved, yet, not commited to the
database. Only when they hit "OK" will their changes on each of the
GridView
pages be committed.

Are there any examples available that demonstrate this capability? I
have
made a good start but would like to base my work on something already
proven. Challenges I currently face are; where to store the edits
that
the
user has made (in view state/code behind/session state), in what form
to
store those edits (in a table class, an array etc.). I have figured
out
>I
need to use a template column to show edit boxes on GridView. But
another
challenge is then referencing the values in those edit boxes in the
code
behind. Also, where to store the IDs of the rows, in hidden text
boxes?
>
Any help/pointers much appreciated!!!!

--
McGeeky
http://mcgeeky.blogspot.com





May 11 '07 #7

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

Similar topics

5
by: Tyler Hudson | last post by:
After reading Erland Sommarskog's most enlightening articles on SQL Server 2000's error handling capabilities (http://www.sommarskog.se/error-handling-I.html and...
3
by: Keith Wilby | last post by:
I have some code in my app that updates data by interrogating data from Artemis. It works fine, but I wondered if I'd be able to write a batch file which, at a predetermined time each day, would...
3
by: mthomason | last post by:
I keep getting this error when trying to update records using an ObjectDataSource. I have seen others post similar errors...but I haven't found any solutions. ObjectDataSource...
0
by: rockdale | last post by:
Hi, I have a web page which let user data enter employee working hours. I used datagrid to list all the employee and templateColumn to format the workhours column to textbox for data entry. And...
0
by: Rick | last post by:
I have an uncomplicated GridView control bound to a SQLDataSource control which hits a test SQL db that I have running locally. Upon executing a series of UPDATEs in the GridView I am seeing...
4
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
16
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on...
2
by: rbrowning1958 | last post by:
Hello, Doing my first ASP project so this may be simple and I'm missing something...could someone please calrify this for me? 1. I have an ASP page with a grich which allows user to add, edit...
8
by: Nick | last post by:
Hi there, I have a GridView in an UpdatePanel, each time the UpdatePanels Load event fires I set the DataSource and call DataBind of the grid view. This works great once, I add an item to the...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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...
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.