I have a Rad Rotator on my page and it's datasource can have multiple records or perhaps just one. Each record has about 35 fields that need to be displayed in an itemized receipt format. I want the rotator to display a "receipt" for each record and the user to navigate through the receipts one at a time by clicking the button. How can I achieve this? It seems to concatenate all of the field values from all records on the same line and looks ugly.
If this can be done with the rotator it would be great but I've never used the rotator before so I'm struggling with how to apply it to this situation.
A VB.NET sample would be appreciated.
Thanks.
If this can be done with the rotator it would be great but I've never used the rotator before so I'm struggling with how to apply it to this situation.
A VB.NET sample would be appreciated.
Thanks.
5 Answers, 1 is accepted
0
Serrin
Top achievements
Rank 1
answered on 23 Dec 2008, 08:45 PM
Hey Acadia,
You could try something like in the demo...
Declarative Datasources
You can look into the ASPX file to see how the binding is done to the customized Rotator template. You would just need to make a template large enough to handle everything you want it to display, get all your bindings set, and turn off the autorotate that you see on the left RadRotator and switch it to the manual rotation that is on the rotating pictures on the right. :)
Nice thing about the demo too, it's all taken care of in your ASPX file, so no need to worry about VB/C#.
You could try something like in the demo...
Declarative Datasources
You can look into the ASPX file to see how the binding is done to the customized Rotator template. You would just need to make a template large enough to handle everything you want it to display, get all your bindings set, and turn off the autorotate that you see on the left RadRotator and switch it to the manual rotation that is on the rotating pictures on the right. :)
Nice thing about the demo too, it's all taken care of in your ASPX file, so no need to worry about VB/C#.
0
Acadia
Top achievements
Rank 1
Iron
answered on 23 Dec 2008, 08:57 PM
Thanks! I was able to get a horizontally scrolling rotator working now showing all of my fields for each record on it's own rotator item, but now the problem is that when I clikc the button (using slideshowbuttons type) it moves over to the next item but the gap on the left grows larger and larger with each item. I want it to completely go to the next item with each click and left justify it.
Do you know what causes this?
Do you know what causes this?
0
Acadia
Top achievements
Rank 1
Iron
answered on 23 Dec 2008, 09:44 PM
Also, is there a way to show an indicator as to which one of the rotator items you are on such as "Item 1 of 5"?
0
Accepted
Hello Acadia,
I am not quite sure about your setup but for the first issue you can try to set two additional properties to the RadRotator - ItemWidth and ItemHeight which let the rotator to determines the item's sizes.
To indicating the current item's index you can implement the following simple logic :
I hope this helps!
Kind regards,
Fiko
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am not quite sure about your setup but for the first issue you can try to set two additional properties to the RadRotator - ItemWidth and ItemHeight which let the rotator to determines the item's sizes.
To indicating the current item's index you can implement the following simple logic :
- attach a function to the OnClientItemShown event of RadRotator ;
- place the global variable that counts the indexes (starting from 0) ;
- get the count of the items from the rotator object (sender in my case) ;
- check if the index is equal to the count of the items then set index to 0 ;
<telerik:RadCodeBlock ID="RadCodeBlock" runat="server"> |
<script type="text/javascript"> |
var currentItemIndex = 0; |
function CountRotatorItems(sender, arg) |
{ |
var itemsCount = sender.get_items().length; |
var label = $get('<%= Label1.ClientID %>'); |
label.innerHTML = currentItemIndex; |
if (currentItemIndex == itemsCount - 1) |
{ |
currentItemIndex = 0; |
} |
else |
{ |
currentItemIndex++; |
} |
} |
</script> |
</telerik:RadCodeBlock> |
I hope this helps!
Kind regards,
Fiko
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Acadia
Top achievements
Rank 1
Iron
answered on 29 Dec 2008, 02:18 PM
This will work. Thanks!