This is a migrated thread and some comments may be shown as answers.

getting cell value when data is grouped

1 Answer 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ulrich Fiege
Top achievements
Rank 1
Ulrich Fiege asked on 01 Oct 2009, 09:45 AM
hello i use this function to get the cell value but if data is grouped currentrow and cell is always nothing.
how can i get the value in grouped mode?

Private Sub grcars_MouseLeftButtonDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles grcars.MouseLeftButtonDown

        If grcars.Records.Count > 0 Then
            'Get ID ----------
            Dim currentRow As GridViewRow = TryCast(grcars.ItemsControl.ItemsGenerator.ContainerFromItem(grcars.CurrentItem), GridViewRow)
            Dim cell As GridViewCell = TryCast(currentRow.Cells(7), GridViewCell) 'ID
            'Get Data -----------
            If cell Is Nothing = False Then
                ClearData()
                LoadData(cell.value.tostring)
                Exit Sub
            End If
        End If

    End Sub

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Oct 2009, 08:29 AM
Hi Ulric,

I've tried this using our latest build however everything worked fine - please check the attached application for more info.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Ulrich Fiege
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or