473,508 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Edit All rows in Datagrid

Hi,

Is it possible editing all rows in datagrid?, i mean all fields are
enabled to edit?, and update all values in just one click?

Thanks,

Alfredo Barrientos

Nov 19 '05 #1
5 2720
You're not going to get any support from the Grid on this. You will have
to make everything an ItemTemplate and put the types on controls you want
the user to use for editing. You'll then have to handle the postback and
iterate over every row posted back and use something like FindControl to
find the posted controls to get their data. It's not hard, just a lot of
manual work.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

Is it possible editing all rows in datagrid?, i mean all fields are
enabled to edit?, and update all values in just one click?

Thanks,

Alfredo Barrientos

Nov 19 '05 #2
Alfredo,
This is very doable. Say you have five columns. Define five template
columns with textboxes in the itemtemplate and then five normal colums that
are not visible. You then bind the five columns from your datasource into
both sets of five colums. On the update button click event you spin through
the grid compare the template values to the non visible values (that
represent the original value) and then do updates where differences exist.

I do it all the time.

Regards,
Gary Blakely
Dean Blakely & Associates
www.deanblakely.com

"Alfredo Barrientos" <ab*********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi,

Is it possible editing all rows in datagrid?, i mean all fields are
enabled to edit?, and update all values in just one click?

Thanks,

Alfredo Barrientos

Nov 19 '05 #3
Hi Gary,

Thanks for answering, could you send any sample?

Thanks,

Alfredo Barrientos

Nov 19 '05 #4
ae
http://www.asp101.com/articles/lee/m...te/default.asp

"Alfredo Barrientos" wrote:
Hi Gary,

Thanks for answering, could you send any sample?

Thanks,

Alfredo Barrientos

Nov 19 '05 #5
Thank you very much ae, this is a very powerfull sample.

Thanks,

Alfredo Barrientos

Nov 19 '05 #6

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

Similar topics

12
2761
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option...
4
1463
by: trebor | last post by:
Most of this code comes from or follows the walkthrough (Using a DataGrid Web Control to Read and Write Data). The problem is that as soon as you click the Edit link, the data rows disappear,...
3
4363
by: Tim::.. | last post by:
Can someone please tell me how I go about preselecting an item in a drop drown list when I click the Edit Command in a datagrid? I have tried the following but it doesn't work for me! I would...
2
1391
by: wolfgang wagner | last post by:
hi all! im trying to edit data in a datagrid (like described here: http://aspnet.4guysfromrolla.com/articles/071002-1.aspx) but if i click the edit button i get the following error invalid...
1
1718
by: jason | last post by:
I've seen a few posts on this issue, but no clear solutions. I have a mulitiline textbox inside a datagrid. I use TemplateColumn to define as multiline with 3 rows. I have other field types...
4
7620
by: Peter | last post by:
(VS 2003) I have a DataGrid and accept button. My problem is when a user starts to edit one of the values in the grid and does not either press Enter or move of the current cell and presses the...
0
1190
by: bh | last post by:
I'm trying to edit data in a datagrid through a dropdown list with different id/text values. The problem comes in when I click the edit button & nothing appears to be happening. Did I do...
9
2708
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
2047
by: jgigowski | last post by:
First, I am new to .NET. I have a internal log which is an XML file that I'm setting up. I can add and sort rows but can't delete them. 'Set this up for editing File...
0
2038
by: jgigowski | last post by:
First, I am new to .NET. I have a internal log which is an XML file that I'm setting up. I can add and sort rows but can't EDIT them. 'Set this up for editing File...
0
7229
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
7129
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
7333
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
7398
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
7502
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
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1566
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 ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.