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

The first key / character is lost when entering it into a cell

You must be typing into a cell which has an image. You then must click in the cell to get the cursor blinking. The first character you type clears the image, and the text of the cell is empty. If you do not have a cursor blinking in the cell when the image is in it, then it will not clear the cell''s text, and your first character will remain in the cell (and the image will be cleared). This can be done by using the arrow keys to move to the cell. Here is the code which clears out the image: this.gridControl.CurrentCellValidateString += new Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventHandler(this.gridControl_CurrentCellValidateString); // ... code ... private void gridControl_CurrentCellValidateString(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventArgs e) { GridStyleInfo cellStyle = gridControl[gridControl.CurrentCell.RowIndex, gridControl.CurrentCell.ColIndex]; if (cellStyle.ImageIndex != -1 && cellStyle.ImageIndex != (int)StateIcons.ReadOnly) { cellStyle.ImageIndex = -1; } } Thanks for any assistance with this dissapearing first character.

2 Replies

AD Administrator Syncfusion Team March 13, 2004 05:54 PM

Attached is a sample that implements the behavior I think you want by handling CurrentCellStartEditing and CurrentCellDeactivated without losing the first keystroke. 9848-1_2307.zip

DA Dan March 15, 2004 09:39 AM

Thanks, you have solved the issue.

Live Chat Icon For mobile
Up arrow icon