We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How can I retrieve values from a child table

Thread ID:

Created:

Updated:

Platform:

Replies:

42710 Apr 4,2006 04:26 PM Apr 5,2006 09:05 AM Windows Forms 2
loading
Tags: GridControl
Steve Killingsworthnolongercoding.NET
Asked On April 4, 2006 04:26 PM

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,

Administrator [Syncfusion]
Replied On April 5, 2006 02:28 AM

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.

Steve Killingsworthnolongercoding.NET
Replied On April 5, 2006 09:05 AM

>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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;