Spreadsheet -- Cancel navigation with OnSelect

1 Answer 123 Views
Spreadsheet
Daniel
Top achievements
Rank 1
Iron
Daniel asked on 02 Nov 2022, 06:05 PM

If you have defined an action for OnSelect, is there a way to cancel the navigation from within the function? I think Kendo does this with Validation. If you add Validation to a cell, then enter invalid data and try to navigate to another cell, the navigation is cancelled until you either fix the data or Cancel the input. Is there a way to replicate that behavior in my own code within the OnSelect event. There is no equivalent to blur when you leave a cell so the next best thing would be to do something as you select another.

 

 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 07 Nov 2022, 11:10 AM

Hi Daniel,

The select event is fired when the Spreadsheet selection is already changed. Thus, the select event does not provide information about the previous selection, but only about the current/new one. If you need to prevent selecting another cell depending on the entered value you can use the approach of handling the changing event discussed in the other Forum thread:

https://www.telerik.com/forums/kendo-spreadsheet-cancel-leaving-cell?_gl=1

You could also take a look at the Spreadsheet events demo where the sequence of the fired events can be easily observed.

https://demos.telerik.com/kendo-ui/spreadsheet/events

I hope this helps.

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Spreadsheet
Asked by
Daniel
Top achievements
Rank 1
Iron
Answers by
Neli
Telerik team
Share this question
or