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

Start editing not only with numbers, but also with minus sign

Hi,

I'm able to start editing in SfDataGrid cells by typing the first character or digit.

For entering negative Numbers I would like to start editing with a minus sign. But this doesn't work.

(After typing the first digit a entered minus sign will result in a leading minus sign. That's ok.)

The problem only occurs after selecting a SfDataGrid cell by tab key or arrow keys. 
When selecting a cell by mouse click, the cell is immediately in edit mode, and there is no problem to start with a minus sign.

Regards
Harald

5 Replies

SR Sivakumar R Syncfusion Team January 13, 2017 10:52 AM UTC

Hi Harald, 
 
Your requirement can be achieved by overriding OnTextInput method of SfDataGrid. You can find the code snippet and sample in the below article, 
 
Thanks, 
Sivakumar 



HB Harald Betzler January 16, 2017 04:41 AM UTC

Hi Sivakumar,

thank you. Now the minus sign starts cell editing but it isn't recognized as content.

I have to enter minus sign twice. One to start editing and one to get a negative number.

Regards
Harald


FP Farjana Parveen Ayubb Syncfusion Team January 17, 2017 09:57 AM UTC

Hi Harald, 
 
Sorry for the inconvenience caused. 
 
We have tested the sample which we have provided in the last update, minus sign is recognized as a content we have checked in CurrentCellEndEdit event of SfDataGrid and editing is starts while entering the minus sign first itself. Both the issues are not reproduced on our end, its works as expected. We have tested the sample in latest Syncfusion version  14.4.0.20, could you please share you Syncfusion product version that will help us to provide the better solution. For your reference we have recorded the video and please refer the video  and sample in following location: 
 
Sample Location: CustomizeEditMode_Sample
 
  
Video Location: MinusValue_Video 
Regards, 
Farjana Parveen A 



HB Harald Betzler January 20, 2017 11:33 AM UTC

Hi Farjana,

thank you for the sample.The sample works as expected. 

But not my application. I do not have time to search the reason, because of live going at the end of next week. Maybe the reason is the usage of renderers or template selector or CurrentCellBeginEdit events or ... or ... or ...

Regards
Harald




JG Jai Ganesh S Syncfusion Team January 23, 2017 10:56 AM UTC

Hi Herald, 
 
A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates. 
 
Regards, 
Jai Ganesh S 


Loader.
Live Chat Icon For mobile
Up arrow icon