Hi Steve,
You can acheive this by handling the TableControlCurrentCellValidateString event and canceling it for a non-numeric entry. Please refer this code snippet:
AddHandler gridGroupingControl1.TableControlCurrentCellValidateString, AddressOf Grid_CurrentCellValidateString
Private Sub Grid_CurrentCellValidateString(ByVal sender As Object, ByVal e As GridTableControlCurrentCellValidateStringEventArgs)
''Get the CurrentCell
Dim cc As GridCurrentCell = Me.gridGroupingControl1.TableControl.GetNestedCurrentCell()
''Get the Style
Dim style As GridTableCellStyleInfo = CType(e.TableControl.GetViewStyleInfo(cc.RowIndex, cc.ColIndex), GridTableCellStyleInfo)
''Check for the ChildTable
If (style.TableCellIdentity.Column.TableDescriptor.ToString() = "MyChildTable") Then
''Check for the Column name in the Table
If (style.TableCellIdentity.Column.Name = "Name") Then
'' Accept only decimal digits
Dim c As Char
For Each c In e.Inner.Text
If (Char.IsDigit(c) = False) Then
e.Inner.Cancel = True
End If
Next
End If
End If
End Sub
Attached is the modified Grid.Grouping.Windows\Samples\ManualRelations sample that handles this for the childtable''s "Name" column.
Best regards,
Jay
ManualRelations_VB.zip