The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
We are running 3.3 version of Syncfusion grid in vb.net. I need to retrieve values from a row in a child table that is currently selected in a grid.
I tried the following code:
Dim r As Grouping.GridRecord = Me.GridGroupingControl1.Table.DisplayElements(Me.GridGroupingControl1.TableControl.CurrentCell.RowIndex).GetRecord
MessageBox.Show(r.GetValue("Railcar")+ ''" - " + r.GetValue("MoveDate")))
This code only allows access to the parent table. I am new at using the Syncfusion Grid. Could someone provide me code snipets that will return child values of the row that is currently selected?
Thanks,
ADAdministrator Syncfusion Team April 5, 2006 06:28 AM UTC
Hi Steve,
Please try the below snipped code to get the current record form parent/child table.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim el As Element = Me.GridGroupingControl1.Table.GetInnerMostCurrentElement()
Dim rec As GridRecord = CType(IIf(TypeOf el Is GridRecord, el, Nothing), GridRecord)
If Not (rec Is Nothing) Then
MessageBox.Show(rec.GetValue("Railcar") + " - " & rec.GetValue("MoveDate"))
End If
End Sub
Regards,
Calvin.
SKSteve Killingsworthnolongercoding.NETApril 5, 2006 01:05 PM UTC
>Hi Steve,
>
>Please try the below snipped code to get the current record form parent/child table.
>
>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
>
> Dim el As Element = Me.GridGroupingControl1.Table.GetInnerMostCurrentElement()
> Dim rec As GridRecord = CType(IIf(TypeOf el Is GridRecord, el, Nothing), GridRecord)
> If Not (rec Is Nothing) Then
> MessageBox.Show(rec.GetValue("Railcar") + " - " & rec.GetValue("MoveDate"))
> End If
>
> End Sub
>
>Regards,
>Calvin.
>
Thanks...It Worked