473,788 Members | 2,988 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Batch update in gridview?

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 have one save button to
submit all the hours that user entered. On the backend save button
clicked event, I mannually build my update statement to write the
workhours into database. Also, if the workhours field is not
editable(e.g the timesheet is submitted), I use <ItemTemplatewi ll
change it to label control.

I do not like use the editcommand etc 'cause that will require user to
click edit button to convert to edit mode- which by the way is very
annoying. But most example on the web is always assume that users are
happy to click a edit button and then update button row by row.

even for edit one record only, I think inline edit is not good because
most case, the datagrid just show the major information from a table
(space limitted or some info is just can be omitted), but if you want
add/edit the record, you need to provide values for all the fields.
For example, I have another page for employee info editing
So what I did is let the datagrid shows a list of employee info (First
name, last name, etc...), and when user select a employee I will
populate this employee's info to another area on the same page, this
editing area contains textbox. dropdownlist .. so that user can do
edit/add here. And now I am glad to see that I can use detailsview for
this.

I like this approach and is worked very well for me.

As now we are move on to the GRIDVIEW/detailview/formview, do they have
something similiar to the approach I used, if they do not have, what is
the suggestion you guys have for these kind of batch update? user enter
data in multiple rows and click save button once to save the data.
Any suggestions /experience are appreciated.

Thanks
-rockdale

Sep 12 '06 #1
0 2143

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

Similar topics

2
6562
by: Paul Reddin | last post by:
Hi, (V8.1 Fp2) Our application uses JDBC batch to execute mutiple insert statements and we saw a strange thing this morning. There were 4 SQL Insert statements in the batch, and we know the 2nd would have violated a Unique Constraint and failed, but the SQL error returned was related to the 3rd statement (which had a FK dependent on the 2nd
2
2311
by: LearnMore.John | last post by:
Is it possible to update all the rows in a single postback using Gridview Control, regards John
0
4351
by: troyblakely | last post by:
I have a gridview which is pulling data from a SqlDataSource, the select command queries a view and the update command is a stored procedure. I'm using a stored procedure because several tables need to be updated based on the data in the gridview. <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:slightsInventoryConnectionString %>" SelectCommand="SELECT * FROM " UpdateCommand="upd_Inventory"...
0
1747
by: mesut | last post by:
Hi there, I've a question. I would like to create a global update button to update all changed records gridview. e.g. A gridview contains 5 columns an 2 of the columns can be updated by the user. (other 3 are readonly) e.g. a column called Status is a dropdownlistbox the user can choose a status of the product and the other column called instructions is a text box, the user can type in any value.
6
2633
by: McGeeky | last post by:
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...
1
9189
by: gabe | last post by:
How do you call a client side javascript callback method after an update panel has posted back to the server? I have two update panels (A + B) with a gridview in each panel. GridView B has a Trigger to listen when GridView A posts back from a Select button. This works fine. I can get the Postback from GridView B and I am able to update formatting of GridView B in it's PreRender Event.
4
6086
by: tim.cavins | last post by:
I have a GridView populated by an ObjectDataSource. I am having issues passing the parameters to the objectdatasource. I have verified that the method is being called but none of the parameters are being populated. Integers are being passed as 0 and strings are empty regardless of what I changed them to in Edit mode on the GridView. My object method to perform the update:
1
3601
by: bravo | last post by:
hi using mysql 4.1 i wish to update records using batch update but for a batch of 100, records and table having only 5000 records execution time is approx 2.4 sec i want to know whether this time is fine or i can further reduce it with some performance tunning ... the table which i am using is having 19 columns the update is on a single column .... one more thing when i use the batch update for deletion batch size 100 along with update...
11
6069
by: SAL | last post by:
Hello, I have a Gridview control (.net 2.0) that I'm having trouble getting the Update button to fire any kind of event or preforming the update. The datatable is based on a join so I don't know if that's what's causing the behavior or not. It seems like the Update button should at least do something. When the Edit button is clicked, the grid goes into Edit mode and the Cancel button takes the grid out of Edit mode. So, I don't get what...
0
9498
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
10364
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
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
8993
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...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
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
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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.