Client Side Current Index

6 posts, 0 answers
  1. Jason
    Jason avatar
    16 posts
    Member since:
    Jul 2006

    Posted 29 Aug 2008 Link to this post

    I'm looking to have a Page X of Y for the rotator.  I'm very close, but can't seem find any documentation on how to get the current index on the client side.

    I have the following

    <script type="text/javascript"
            function itemShown_handler(sender, args) { 
                alert(sender.get_id() + " has changed a frame"); 
            } 
        </script> 

    What should I be doing to get the index?

    Thanks.
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 Sep 2008 Link to this post

    Hi Jason Brozek,

    You can do this by using args.get_item().get_index() - the code is available in the same example that you have read.


    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Amanda
    Amanda avatar
    2 posts
    Member since:
    Sep 2008

    Posted 10 Sep 2008 Link to this post

    I'm trying to do the same thing as the OP - the suggested solution doesn't work, as this is the OnClientItemShown handler, which returns null for args.get_item()

    Is there any way to get the current index from the OnClientItemShown handler?

    If not, it would be very useful to be able to, or to have a client-side event for the next/previous button click.
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 12 Sep 2008 Link to this post

    Hi Amanda,

    Currently this is not possible, but I logged it in our database and we will do our best to fix that problem for the next update.

    Your points were updated for bringing this problem to our attention.


    All the best,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Jason
    Jason avatar
    16 posts
    Member since:
    Jul 2006

    Posted 15 Sep 2008 Link to this post

    Do you have any temporary solution to this?  Something we could do in Javascript?
  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 16 Sep 2008 Link to this post

    Hi Jason,

    Unfortunately no, this functionality will be added in the future.


    Kind regards,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017