F
Frenchie
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("lblCategoryID")).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
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("lblCategoryID")).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