PublicSubNew()
InitializeComponent()
C1FlexGrid.ItemsSource = Product.GetProducts(50)
AddHandler C1FlexGrid.KeyDown, AddressOf C1FlexGrid_KeyDown
AddHandler delBtn.Click, AddressOf delBtn_Click
End Sub'Deleteキーを押してセルのデータを削除することができます
PrivateSub C1FlexGrid_KeyDown(sender AsObject, e As KeyEventArgs)
If e.Key = Key.Delete Then
DeleteItem()
EndIfEnd SubPrivateSub delBtn_Click(sender AsObject, e As RoutedEventArgs)
DeleteItem()
End SubPrivateSub DeleteItem()
If C1FlexGrid.SelectedItem IsNotNothingThen
C1FlexGrid(C1FlexGrid.Selection.Row, C1FlexGrid.Selection.Column) = System.DBNull.Value
EndIfEnd Sub