Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > i want value single cell.

Not answered i want value single cell.

Feed from this thread
  • Massimo avatar

    Posted on Feb 22, 2012 (permalink)

    this is correct:

    For Each item As GridDataItem In RadGrid1.SelectedItems
                Dim value As [String] = item("Priorità").Text.ToString()
                MsgBox(value)
            Next
           

    but if i want value of single cell in row 0?

            Dim x As GridDataItem = RadGrid1.SelectedItems(0)
            Dim r As String = x("NameColumn").Text
            MsgBox(x)

    Reply

  • Posted on Feb 22, 2012 (permalink)

    Hello,

    You can access the cell value as shown below.
    VB:
    Protected Sub Button4_Click(sender As Object, e As EventArgs)
        Dim item As GridDataItem = DirectCast(grid.SelectedItems(0), GridDataItem)
        Dim value As String = item("UniqueName").Text
    End Sub

    -Shinu.

    Reply

  • Tsvetoslav Tsvetoslav admin's avatar

    Posted on Feb 24, 2012 (permalink)

    Hi Massimo,

    You should use:
    Dim x As GridDataItem = RadGrid1.SelectedItems(0)
    Dim fieldValues As New Hashtable()
     x.ExtractValues(fieldValues)

    After the last statement fieldValues will contain a key/value collection of all column fields and their values in the selected grid row.

    Regards, Tsvetoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > i want value single cell.
Related resources for "i want value single cell."

ASP.NET Grid Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]