Home Forums WinForms controls Xceed Grid for WinForms Detail Grid (URGENT) Reply To: Detail Grid (URGENT)

User (Old forums)
Member
Post count: 23064

Hi There

I can understand your frustration now….
I tried getting the data and I was expecting that the mouse events would help me
retrieve the data. The mouse events did not respond.
But you can do the following

Add a button to your form
and when the user clicks the button
get all the data selected data or get a single cell
using the masterDetailGrid.SelectedRows
see below

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim text As String = String.Empty
Dim row As row
For Each row In masterDetailGrid.SelectedRows
If TypeOf row Is CellRow Then
Dim cell As cell
For Each cell In CType(row, CellRow).Cells
text += cell.Value.ToString() + vbTab
Next cell

text += Environment.NewLine
End If
Next row

MsgBox(text)
End Sub

Imported from legacy forums. Posted by Soong (had 592 views)