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

Client Side Current Index

5 Answers 96 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 29 Aug 2008, 05:14 PM
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.

5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Sep 2008, 02:17 PM
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.
0
Amanda
Top achievements
Rank 1
answered on 10 Sep 2008, 07:04 PM
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.
0
Georgi Tunev
Telerik team
answered on 12 Sep 2008, 08:52 AM
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.
0
Jason
Top achievements
Rank 1
answered on 15 Sep 2008, 06:01 PM
Do you have any temporary solution to this?  Something we could do in Javascript?
0
Georgi Tunev
Telerik team
answered on 16 Sep 2008, 11:40 AM
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.
Tags
Rotator
Asked by
Jason
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Amanda
Top achievements
Rank 1
Jason
Top achievements
Rank 1
Share this question
or