473,473 Members | 2,131 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

gridview bulk editing

I have a Gridview with a checkbox on each row.

I would like to be able to select 1 or more rows and edit one of the
fields in each of these rows. Basically, I dont want my users to have
to edit each row, one at a time. If I can make it so that they can edit
on column for each row that they select I will be really happy.

Right now I am using a session to pass some values to the other page,
where I will be doing the editing, but I cannot pass the string that is
stored in each one of the row...

Once I have that figured out, I should be able to create a datasource
that will query my database and return only the rows that are in my
array that i am passing through the session value.

Here is the code in my code behind page

Protected Sub edit_jobs_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles edit_jobs.Click
Dim selectedValues As ArrayList
selectedValues = New ArrayList()

'This will select multiple items

For Each gvr As GridViewRow In GridView1.Rows

Dim result As Boolean =
(CType(gvr.FindControl("RowLevelCheckBox"), CheckBox)).Checked
If (result) Then
'below is the C# version of the code I would like in VB
'int categoryID =
Convert.ToInt32(((Label)row.FindControl("lblCatego ryID")).Text);
Dim line_numb As String
'The next line is the one that I cannot get to work.
line_numb = ("job_numb" + (selectedValues.Count +
1).ToString).ToString.Trim

selectedValues.Add(line_numb)
End If
Next

' Put the selected values in the Session to be used in a
different page

Session("SELECTEDVALUES") = selectedValues

'transfer to a new page

Response.Redirect("choose_press.aspx")
End Sub
can anyone help...
Thanks

Sep 23 '06 #1
0 1736

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

Similar topics

4
by: P. Yanzick | last post by:
Hello, I've been playing with master/detail views as well as editing in the gridview, and I ran across a strange problem that I am not exactly sure where to go to try to solve. I have 2...
0
by: siamesedream | last post by:
I have a GridView that I use for bulk editing. I override the CreateRow method and logically OR each row's state with DataControlRowState.Edit. Doing this, however, means that each row is rendered...
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.
3
by: cpnet | last post by:
I have a GridView which I'm populating from an ObjectDataSource (give the GridView a DataTable). The GridView will have about 20 rows, and only one editable column. The editable column consists...
1
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Hi, I have a gridview which I added a <asp:CommandField EditText="E" CancelText="C" UpdateText="U" ButtonType="Link" ShowEditButton="True" /> my gridview looks like this <asp:GridView...
3
by: =?Utf-8?B?Um9iZXJ0IENoYXBtYW4=?= | last post by:
Hi, Fairly easy to create one running total for a gridview but what if you have dozens of them? I have a gridview that allows bulk editing (all rows at once) and have it set up so that, on data...
1
by: =?Utf-8?B?VW1lc2huYXRo?= | last post by:
I have a aspx page and my data to display like excel sheet (we can consider data in a grid view), the last column in the grid is a check box. The users have option for editing the data in grid view...
3
by: Brian VanDyke | last post by:
I have to display a table with customer data (GridView). However, I want to be able to show DropDownList controls inside one of the columns, not just textbox controls. Is this possible? Is it...
5
by: =?Utf-8?B?Z3V5?= | last post by:
How do you enable editing in a GridView programatically rather than via its Tasks menu? Guy
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
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...
1
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
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,...
1
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...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
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.