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 to set focus to next cell of next row and same column in child table in gridgrouping contro when TableControlCurrentCellEditingComplete event is fired

Thread ID:

Created:

Updated:

Platform:

Replies:

117931 Jan 10,2015 09:05 AM Jan 13,2015 12:26 AM Windows Forms 1
loading
Tags: GridGroupingControl
Supriya Varne
Asked On January 10, 2015 09:05 AM


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

Neelakandan Kannan [Syncfusion]
Replied On January 13, 2015 12:26 AM

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

 


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.

;