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

Display the running count and the total

6 Answers 71 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
edward
Top achievements
Rank 1
edward asked on 16 Apr 2010, 08:04 AM

Database : Access2007
Asp.net Ajax 2010 Q1 Trial

I think so many people is asking the no. of items

I want to display the counter items and total in the rotator.
I will display one jpeg in the rotator

For example there are 10 jpeg files

First screen

JPEG

1/10

press next button show

JPEG

2/10

press next forward show

JPEG

1/10

so that user can know the display of which items

I have a idea but I don't know can work or not

Add the two fields (one is running counter 1,2,3,,, other is the total count) in the SQL command and then in the rotator items add this two fields

Thanks!

6 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Apr 2010, 11:07 AM
Hello Edward,

I hope the following approach by calculating the rotator item status explicitly, would help you in achieving the functionality.

JavaScript:
 
<script type="text/javascript"
    function OnClientItemShown(sender, args) { 
        var text = (args.get_item().get_index()+1) + "/" + (sender.get_items().length - 1); 
        alert(text);  // Set this as label text to show on page 
    } 
</script> 

Thanks,
Princy.
0
edward
Top achievements
Rank 1
answered on 16 Apr 2010, 12:10 PM
Dear Princy,

Thanks for reply!

I will try it !

Edward

-------------------
it works but  sender.get_items.length need not  -1
Also other problems is 
I have 16 jpeg files
I have check the sql result is correct (sql have group by three fields)
1) When I run the program is display the no.15 jpeg not the first one why?

2) When I use the WrapFrame="False" the last one jpeg is not show white screen.
one jpeg display in item only 

 
0
Fiko
Telerik team
answered on 21 Apr 2010, 02:14 PM
Hello Edward,

In reference to your questions:
  • I prepared a test project but I was not able to reproduce the first reported problem. Attached is my test scenario.
  • The blank spaces occurs in scenarios where the Width, ItemWidth, Height and ItemHeight properties of the RadRotator control are not correctly set. For your convenience I have attached a project to this thread that shows an example configuration, based on your requirements.

In case that the provided information and project does not help, could you please modify the attached project, open a new support ticket and send it back? I will check it and do my best to help as soon as possible.

I hope this helps.


All the best,
Fiko
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
edward
Top achievements
Rank 1
answered on 21 Apr 2010, 08:57 PM

Dear Fiko,

 

Thanks for reply!

I will try it.

 

Thanks a lot!

 

Best Regards

 

Edward

0
edward
Top achievements
Rank 1
answered on 22 Apr 2010, 01:14 PM

Dear Fiko,

I have reply the ticket.
Ajax - Rotator : Why display jpeg is not the first one?

Attach the full source for you.

Please see thanks!

Also can you have any controls for the following website to select image?
http://www.nasa.gov/mission_pages/sdo/multimedia/gallery/gallery-index.html

Thanks!

 

Best Regards

 

Edward

0
Fiko
Telerik team
answered on 27 Apr 2010, 02:45 PM
Hi Edward,

In reference to your questions:
  1. This problem is already fixed and the changes will be available in the next internal build.
  2. The RadPanelBar for Silverlight or RadPanelBar for ASP.NET AJAX controls may fit your requirements.

I hope this helps.

Kind regards,
Fiko
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Rotator
Asked by
edward
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
edward
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or