Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2004, 09:01 AM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with Datagrid

I'm using a simple data grid bound to a sql table.
I've added the following

    Private Sub dg1_ItemCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs )
        Session("donorps") = 'the donorps value on the row clicked'
        Response.Redirect("pages.aspx")

    End Sub

donorps is the 2nd column in the data grid, how do I get the value of the donorps column of the row clicked?

Any help would be great.

 
Old October 15th, 2004, 01:57 PM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind, figured it out
added the following

        Dim key As String = dg1.DataKeys(e.Item.ItemIndex)
        Session("donorps") = key






Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom paging in Datagrid with datagrid page count madhusrp ASP.NET 1.0 and 1.1 Professional 12 June 2nd, 2008 01:15 PM
User COntrol Datagrid inside datagrid rodmcleay ASP.NET 1.0 and 1.1 Professional 3 April 14th, 2007 10:11 AM
Creating DataGrid In Repeater/DataGrid liduwan ASP.NET 1.0 and 1.1 Professional 9 March 6th, 2007 03:31 PM
datagrid ajaidass ADO.NET 2 March 1st, 2007 05:36 PM
Need help regarding datagrid ngsharmila .NET Framework 1.x 1 February 1st, 2006 12:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.