This is a migrated thread and some comments may be shown as answers.

Trigger spin(0), spin(1) manually from outside

5 Answers 74 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
CS
Top achievements
Rank 2
CS asked on 28 Jul 2015, 07:36 AM

Hello,

 is it possible to trigger the spinners for up and down manually somehow instead of setting the value and stuff like that?

5 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 30 Jul 2015, 07:00 AM
Hello,

You can achieve the desired functionality through the client object and its private method _step():
numericTextBox = $("#numericTextBox").data("kendoNumericTextBox");
numericTextBox._step(1);
;

And in the following Dojo example you can see this in action:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
CS
Top achievements
Rank 2
answered on 30 Jul 2015, 07:09 AM

Yes that helps a lot.

To take it a step further, how would I do that in a grid when the custom numerictextbox editor is not currently open but I need the step size, max, min and so on of that column/cell ?

0
Konstantin Dikov
Telerik team
answered on 30 Jul 2015, 02:52 PM
Hello,

I am not sure that I understand the exact requirement that you have in the context of the grid. Can you please elaborate a little bit more on the scenario and the functionality that you are looking for?

Additionally, if you can create a simplified example in dojo with your scenario, we will be able to work directly on it.

Looking forward to your reply.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
CS
Top achievements
Rank 2
answered on 30 Jul 2015, 03:06 PM

Okay I have set up this example http://dojo.telerik.com/aMOTo/2 

But instead to use +1, -1 I want spin up/down because in every row the step size could be different for each numerictextbox. so instead of saving the step size of the row somewhere and reading them out before inc/dec I just want to trigger the spinner so that I don't have to care about min/max/step.

0
Konstantin Dikov
Telerik team
answered on 30 Jul 2015, 03:49 PM
Hi,

I have modified the logic of the custom command buttons and as you will notice, we are opening the cell for editing, so we can get reference to the NumericTextBox and use its _step() method for changing the value:

Best Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
NumericTextBox
Asked by
CS
Top achievements
Rank 2
Answers by
Konstantin Dikov
Telerik team
CS
Top achievements
Rank 2
Share this question
or