473,386 Members | 1,708 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,386 software developers and data experts.

Save GridView once?

I have a small GridView about max 10 rows and few columns. The columns are
simple just a checkbox and a textbox and a bound name.

The users don’t want to click “edit” button to edit and save each row one by
one. They want to edit multiple rows and save once.

I try to put checkbox and textbox in ItemTemplate, and the UI looks OK on
client site. I can select checkbox and type chars in textbox. But when I try
to save them through GridView.Rows after posting back, the checkbox and
textbox states are not post back or updated.

I think, the textbox value should be posted back because it was renderd as
<INPUTcontrol. Maybe, the ASP.NET engine doesn’t update textbox object when
it re-construct textbox objevt at server side.

Is there a way to retreviel the textbox value by implementing a event
handler, or set a property? The textbox client id is wiered at GridView rows,
and only Microsoft know the convension and I don’t.

Short question is:

Is there any way to save all row once, not row by row?

I know repeater does. But making repeater look like a Gridview is paintful.

Thanks for any help.

Shaw
Oct 16 '07 #1
1 2482
Sorry, it’s my mistake. I put GridView binding routine out of “IsPostBack”
bracket at Page_Load procedure, and GridView binding routine gets called
evrytime before saving event handler routine after postback. The binding
routine wraps off all changes users entered.

Actually, you can retrievel all current GridView data row by row through
rows property and save them once.

Shaw

"Shaw" wrote:
I have a small GridView about max 10 rows and few columns. The columns are
simple just a checkbox and a textbox and a bound name.

The users don’t want to click “edit” button to edit and save each row one by
one. They want to edit multiple rows and save once.

I try to put checkbox and textbox in ItemTemplate, and the UI looks OK on
client site. I can select checkbox and type chars in textbox. But when I try
to save them through GridView.Rows after posting back, the checkbox and
textbox states are not post back or updated.

I think, the textbox value should be posted back because it was renderd as
<INPUTcontrol. Maybe, the ASP.NET engine doesn’t update textbox object when
it re-construct textbox objevt at server side.

Is there a way to retreviel the textbox value by implementing a event
handler, or set a property? The textbox client id is wiered at GridView rows,
and only Microsoft know the convension and I don’t.

Short question is:

Is there any way to save all row once, not row by row?

I know repeater does. But making repeater look like a Gridview is paintful.

Thanks for any help.

Shaw
Oct 18 '07 #2

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

Similar topics

28
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when...
4
by: Jim Katz | last post by:
I have an application that updates a strongly typed data set at run time. I'd like to dynamically create a table that connects to a run time data table. For displaying the data, this works well. ...
3
by: Jeff | last post by:
Hey asp.net 2.0 In the source I posted below, there is a GridView (look at the bottom of the script): <asp:GridView ID="gvwOnline" runat="server"> </asp:GridView> I'm trying to assign a...
1
by: David Lozzi | last post by:
Howdy, I've decided to try and use the gridview and a sqldatasource. When I add the sqldatasource connection (to MSDE 2000) and press save, I get "Visual Studio has encountered an unexpected...
4
by: GD | last post by:
Hi, I have the following C# code in a page: Response.ContentType = "APPLICATION/OCTET-STREAM"; Response.AppendHeader("Content-Disposition", "Attachment; Filename=\"C:\\Download.txt\"" FileInfo...
3
by: Laila2008 | last post by:
Hi, I am trying to update data and highlight updated row in a GridView. To change the data I loop through the dataset, find the row I want, set the new data and call DataBind() on the GridView....
0
by: jaredciagar | last post by:
Hello Guys, Can You Help ME Please.... I'm Using VB scipt,Asp.net and MS SQL 2005 I have Temporary Data in my gridview and I want it to save in MS SQL DB... For Example: gridview...
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
by: tilak p | last post by:
hiiiii i have a asp.net page which contains gridview after entering data to gridview and updating in gridview i have given a save button on pressing it the data in grid will be sent to save...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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,...
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...

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.