Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Grid Selected Cell Value to another form

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I'm trying to pass the cell value from a selected row in a grid. I can't seem to get it to work correctly. I can pass a specified row by using .Rows(0).Cells(0).Text but not a selected row.

any help would be appreciated

Thanks

Private Sub dg_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles dg.RowCommand

If (e.CommandName = "Select") Then

Session("Value") = dg.SelectedRow.Cells(0).Text
Response.Redirect("NewForm.aspx")

End If

End Sub

 
there seems to be no Cell Click event in the asp.net grid

 
No there isn't but you said you wanted to select a row and pass a value(s)
Can you explain in detail what you are trying to do and maybe we can help you come up with a solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top