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

6 posts, 0 answers
  1. con_ssc
    con_ssc avatar
    87 posts
    Member since:
    Apr 2014

    Posted 28 Jul 2015 Link to this post

    Hello,

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

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 30 Jul 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. con_ssc
    con_ssc avatar
    87 posts
    Member since:
    Apr 2014

    Posted 30 Jul 2015 in reply to Konstantin Dikov Link to this post

    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 ?

  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 30 Jul 2015 Link to this post

    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!
     
  6. con_ssc
    con_ssc avatar
    87 posts
    Member since:
    Apr 2014

    Posted 30 Jul 2015 in reply to Konstantin Dikov Link to this post

    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.

  7. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 30 Jul 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready