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

Clearing Cells

How can I clear the contents of a cell using the delete key, I need this to work on currency, textbox and combo cell types.

3 Replies

AD Administrator Syncfusion Team September 30, 2004 11:51 AM

What version of our library are you using? I had no problems selecting cells in the CellTypes\ComboBoxes and CellTypes\Currency samples that we ship, and the pressing the Delete key to clear the cells using 2.1.0.9. Do these samples work for you?


AD Administrator Syncfusion Team September 30, 2004 12:06 PM

I’m using Grid Control version 2.0.5.1of Essential Grid in VB.NET. I notice the clearingcells event does not fire for a single cell, what event should I use to trap this situation? >What version of our library are you using? I had no problems selecting cells in the CellTypes\ComboBoxes and CellTypes\Currency samples that we ship, and the pressing the Delete key to clear the cells using 2.1.0.9. Do these samples work for you?


AD Administrator Syncfusion Team September 30, 2004 12:38 PM

I think this code in a CurrentCellKeyDown event handler should do it.
If e.KeyCode = Keys.Delete _
   And Not Me.gridControl1.CurrentCell.IsEditing _ 
   And Me.gridControl1.Selections.Ranges.Count = 0 Then
      Console.WriteLine("Delete on single cell")
End If

Loader.
Live Chat Icon For mobile
Up arrow icon