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

How to avoid to get focus on sfNumericUpdown on sfNumericUpdownColumn on sfGrid when we select it

Hi,

We use a SfGrid with a SFNumericUpDownColumn.

When we select a line, SfNumericUpDown appears and sfNumericInput get the focus.

We would like that SfNumericInput don't get the focus and let the user put the focus on the input manually.

Regards,

5 Replies

JG Jai Ganesh S Syncfusion Team February 23, 2017 01:00 PM UTC

Hi Nicolas, 
We suspect that you have loaded the SfNumericUpDown inside the CellTemplate and also set the EditTrigger as the OnTap in your application. Hence it will get the focus while we select the cell. However, you can achieve your requirement to get the focus while we edit the cell for loading the SfNumericUpDown inside the EditTemplate like below, 
 
                <syncfusion:GridTemplateColumn MappingName="OrderScore.StepValue" syncfusion:FocusManagerHelper.WantsKeyInput="True"> 
                    <syncfusion:GridTemplateColumn.CellTemplate> 
                        <DataTemplate> 
                            <TextBlock Text="{Binding OrderScore.StepValue}"/> 
                        </DataTemplate> 
                    </syncfusion:GridTemplateColumn.CellTemplate> 
                    <syncfusion:GridTemplateColumn.EditTemplate> 
                        <DataTemplate> 
                            <editors:SfNumericUpDown syncfusion:FocusManagerHelper.FocusedElement="True"/> 
                        </DataTemplate> 
                    </syncfusion:GridTemplateColumn.EditTemplate> 
                </syncfusion:GridTemplateColumn> 
 
 
If the above is not your requirement, then please let us know whether you have used the GridUpDownColumn in SfDataGrid? or if possible please replicate the issue in above sample. This would be more helpful for us to proceed further. 
 
Regards, 
Jai Ganesh S 



NI Nicolas February 23, 2017 03:36 PM UTC

Thanks,

But we use the sfnumericupdown coloumn :).
We found a solution, juste to override the onload event method I think.

Regards,


JG Jai Ganesh S Syncfusion Team February 24, 2017 03:52 AM UTC

Hi Nicolas,  
Thank you for the update. 
Could you please let us know whether you found the solution in your end? or please let us know if you need further assistance on this? 
Regards, 
Jai Ganesh S 



NI Nicolas February 24, 2017 09:06 AM UTC

Hi,

Just override EditElementLoaded, I call base method if the source is a mouse device, I call nothing if the source is a touch device.

:).


Regards


JG Jai Ganesh S Syncfusion Team February 27, 2017 12:44 PM UTC

Hi Nicolas, 
 
We are glad that you have found the solution to achieve your requirement. Also, we thank you for sharing the information
 
Regards, 
Jai Ganesh S 


Loader.
Up arrow icon