Hello,
please, how can I do a double-click-cell-event to see in a pop-dialog the detail rows in a pivot grid?
I have try it, but It doesn´t works.
I add my basic code of pivot grid (UPDATED WITH THE CODE OF UNDERLYING)
Thank you!
-------
updates of today: Now, the gridview show columns: rowerror, rowstate, ...
I upload the updated code.
Please, can you help me? Thanks!
Solved!
Private Sub radPivotGrid1_MouseDoubleClick(ByVal sender As Object, ByVal e As MouseEventArgs) Handles RadPivotGrid1.DoubleClickIf e.Button = MouseButtons.Left Then
Dim pivotGrid As RadPivotGrid = CType(sender, RadPivotGrid)
Dim cell As PivotCellElement = TryCast(pivotGrid.ElementTree.GetElementAtPoint(e.Location), PivotCellElement)
If cell IsNot Nothing Then
Dim row = cell.Row.Group
Dim column = cell.Column.Group
Dim localProvider As LocalDataSourceProvider = TryCast(pivotGrid.DataProvider, LocalDataSourceProvider)
localProvider.GetUnderlyingData(row, column)
End If
End If
Me.SplitContainer2.Panel2Collapsed = True
MMostrarDetalleToolStripMenuItem_Click(Nothing, Nothing)
Me.RadGridView1.BestFitColumns()
End Sub
Private Sub provider_GetUnderlyingDataCompleted(ByVal sender As Object, ByVal e As Telerik.Pivot.Core.DrillDown.DrillDownCompletedEventArgs)
Dim underlyingData As IEnumerable = e.Result
Me.RadGridView1.BeginInvoke(New Action(Function()
If e.InnerExceptions.Count = 0 Then
DisplayUnderlyingData(underlyingData)
End If
End Function))
End Sub
Public Sub DisplayUnderlyingData(ByVal underlyingData As IEnumerable)
Dim counter As Integer = 0
Dim dt As DataTable = New DataTable()
For Each row As DataRow In underlyingData
If counter = 0 Then dt = row.Table.Clone()
dt.Rows.Add(row.ItemArray.ToArray())
counter += 1
Next
Me.radGridView1.DataSource = dt
End Sub