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

how to set focus to next cell of next row and same column in child table in gridgrouping contro when TableControlCurrentCellEditingComplete event is fired


Hi,
I am using Gridgrouping control.
I have Parent-Child Relationship in the control.
I want to change values in cell of  rows values in child table.
when TableControlCurrentCellEditingComplete is fired  following code 

 Me.GridGroupingControl1.Table.Records(Pindex - 3).IsExpanded = True  'When we change the value in child table cell every time table is collapsed hence parent record can be expanded

When down arrow key is pressed how to set focus to next cell of next row and same column  in child table in gridgrouping control of syncfusion

Thank you and Regards,
Supriya

1 Reply

NK Neelakandan Kannan Syncfusion Team January 13, 2015 05:26 AM UTC

Hi Supriya,

 

Thank you for your interest in Syncfusion products.

 

We regret to let you know that we could not clearly understand you query. But we have provided the sample that what we have understood from your query. In the below sample, if you press down arrow when cell is in parent table, focus will be move to child table. It can be achieved by customizing TableControlCurrentCellKeyDown event. Using this event, you can customize your need regarding down arrow key press. Please make use of below code,

 

Code Snippet:

 Private Sub gridGroupingControl1_TableControlCurrentCellKeyDown(ByVal sender As ObjectByVal As GridTableControlKeyEventArgs)
        
If (e.Inner.KeyCode Keys.DownThen
            Dim 
style As GridTableCellStyleInfo = Me.gridGroupingControl1.TableControl.GetTableViewStyleInfo(e.TableControl.CurrentCell.RowIndex, e.TableControl.CurrentCell.ColIndex)
            
Dim style1 As GridTableCellStyleInfo = Me.gridGroupingControl1.TableControl.GetTableViewStyleInfo((e.TableControl.CurrentCell.RowIndex + 1), e.TableControl.CurrentCell.ColIndex)
            
If ((Not (style) Is Nothing)  _
                        
AndAlso ((Not (style.TableCellIdentity) Is Nothing)  _
                        
AndAlso ((Not (style1.TableCellIdentity) Is Nothing)  _
                        
AndAlso ((style1.TableCellIdentity.TableCellType GridTableCellType.NestedTableCell)  _
                        
AndAlso (((style.TableCellIdentity.TableCellType GridTableCellType.RecordFieldCell)  _
                        
OrElse (style.TableCellIdentity.TableCellType GridTableCellType.AlternateRecordFieldCell))  _
                        
AndAlso style.TableCellIdentity.DisplayElement.GetRecord.HasNestedTables))))) Then
                Dim 
childTableName As String = style1.TableCellIdentity.DisplayElement.GetRecord.NestedTables(0).ChildTable.Name
                
Me.gridGroupingControl1.GetTableControl(childTableName).CurrentCell.MoveTo(32)
                e.Inner.Handled 
= true
            End If
        End If
    End Sub

 

Sample:

http://www.syncfusion.com/downloads/support/directtrac/117931/Sample_CurrentCell_Focus-1317168227.zip

 

Please let me know if I misunderstood your query.

 

Regards,

Neelakandan

 


Loader.
Up arrow icon