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. Image for the cookie policy date
close icon

CurrentRecord

How can I set a currentrecord while clicking a disabled cell? Here''s what I have Private Sub Grid_TableControlCellDoubleClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs) Handles Grid.TableControlCellDoubleClick Me.Grid.TableControl.CurrentCell.MoveTo(e.Inner.RowIndex, 0) Field1 = e.TableControl.Table.Records(e.Inner.RowIndex - 1).GetValue(0) Field2 = e.TableControl.Table.Records(e.Inner.RowIndex - 1).GetValue(1) lFTCID = End Sub And that works fine for the parent table, but when I click the child table, the row index gets off, it always starts at 0 for the first child of the parent row. How can I set the clicked child row? Thanks

2 Replies

AD Administrator Syncfusion Team September 22, 2005 11:30 PM UTC

Hi, Try this: Record r = e.TableControl.Table.DisplayElemements[e.Inner.RowIndex].ParentRecord; if (r != null) r.SetCurrent(); Stefan >How can I set a currentrecord while clicking a disabled cell? Here''s what I have > > Private Sub Grid_TableControlCellDoubleClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs) Handles Grid.TableControlCellDoubleClick > > Me.Grid.TableControl.CurrentCell.MoveTo(e.Inner.RowIndex, 0) > > Field1 = e.TableControl.Table.Records(e.Inner.RowIndex - 1).GetValue(0) > Field2 = e.TableControl.Table.Records(e.Inner.RowIndex - 1).GetValue(1) > lFTCID = > End Sub > >And that works fine for the parent table, but when I click the child table, the row index gets off, it always starts at 0 for the first child of the parent row. How can I set the clicked child row? > >Thanks >


JL Jose Lacson September 22, 2005 11:50 PM UTC

Thank you >Hi, > >Try this: > >Record r = e.TableControl.Table.DisplayElemements[e.Inner.RowIndex].ParentRecord; >if (r != null) >r.SetCurrent(); > >Stefan > >>How can I set a currentrecord while clicking a disabled cell? Here''s what I have >> >> Private Sub Grid_TableControlCellDoubleClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs) Handles Grid.TableControlCellDoubleClick >> >> Me.Grid.TableControl.CurrentCell.MoveTo(e.Inner.RowIndex, 0) >> >> Field1 = e.TableControl.Table.Records(e.Inner.RowIndex - 1).GetValue(0) >> Field2 = e.TableControl.Table.Records(e.Inner.RowIndex - 1).GetValue(1) >> lFTCID = >> End Sub >> >>And that works fine for the parent table, but when I click the child table, the row index gets off, it always starts at 0 for the first child of the parent row. How can I set the clicked child row? >> >>Thanks >>

Loader.
Live Chat Icon For mobile
Up arrow icon