AZGroups.com

Bringing together Arizona Technology Users And Enhancing the Careers of Developers
Welcome to AZGroups.com Sign in | Join | Help

Problem with retrieving gridview cell values

  •  04-11-2008, 2:50 AM

    Problem with retrieving gridview cell values

    Hi

    I just want to retrieve the cell value from the gridview using the following code,but it returns nothing

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand

    Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand

    If e.CommandName = "Select" Then

    Dim idx As Integer = Convert.ToInt32(e.CommandArgument)

    Dim row As GridViewRow = GridView1.Rows(idx)

    LblDisplay.Text = "Customer Id: " & row.Cells(1).Text.ToString

    Dim idx As Integer = Convert.ToInt32(e.CommandArgument)

    Dim row As GridViewRow = GridView1.Rows(idx)

    LblDisplay.Text = "Customer Id: " & row.Cells(1).Text.ToString

    Dim row As GridViewRow = GridView1.Rows(idx)

    LblDisplay.Text = "Customer Id: " & row.Cells(1).Text.ToString

    "Customer Id: " & row.Cells(1).Text.ToString

    End If

    End Sub

    End If

    End Sub

    End Sub

     Can anyone help me to find out whats wrong with my code?

    Regards,

    Priya

View Complete Thread
Powered by Community Server, by Telligent Systems