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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CurrentCellValidating and keyboard arrows

Thread ID:

Created:

Updated:

Platform:

Replies:

1555 Nov 11,2002 05:50 PM UTC Nov 12,2002 12:53 PM UTC Windows Forms 2
loading
Tags: GridControl
Teodorico Morell
Asked On November 11, 2002 05:50 PM UTC

Hi, I am using the event “CurrentCellValidating” to do some validations. I get the value entered in the cell as follows: string newValue = grid.CurrentCell.Renderer.ControlText; The problem: Sometimes I might want to change the data entered by the user; like adding a text. grid.CurrentCell.Renderer.ControlText = “$ “ + newValue; If the user presses the “Enter” key, it works fine, but if the user presses an arrow key to move to another cell, the cell displays the edited text but does not exit the editing mode. If the arrow key is pressed again, the cell value is cleared. If the text is not modified in the event, the arrow keys work fine. Thanks.

Administrator [Syncfusion]
Replied On November 12, 2002 11:16 AM UTC

Try setting the Renderer.Control.Text member instead of Rendere.ControlText. this.gridControl1.CurrentCell.Renderer.Control.Text = "$" + this.gridControl1.CurrentCell.Renderer.ControlText;

Teodorico Morell
Replied On November 12, 2002 12:53 PM UTC

Clay, It worked fine. It also helps me to do other stuff like removing the thousand separators when entering edit mode. Thanks.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;