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

Spacebar and editing

This should be simple.. I want to override the "spacebar" behavior. Currently the spacebar begins editing a cell. I want to occasionally prevent this. Is there and event the I can return e.cancel = true when I want to prevent editing? Thanks

2 Replies

AD Administrator Syncfusion Team May 13, 2004 10:59 AM

I would try CurrentCellKeyPress. You could also probably use CurrentCellStartEditing.
private void gridControl1_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
{
	if(e.KeyChar == '' '' && !this.gridControl1.CurrentCell.IsEditing)
	    e.Handled = true;
}


AD Administrator Syncfusion Team May 13, 2004 12:18 PM

perfect!!

Loader.
Live Chat Icon For mobile
Up arrow icon