Hi,
The below mention is the radrotator controls which I have created.
I have given the rotator dimensions and rotator type in .cs file,which is working fine. The rotator shows 3 images per frame.Suppose if there are 7 images then 3 frames will be shown. I'm getting the number of frames from "Var Frames" in the script.
What I want is that how to find the current frame if i move the left/right button in rotator ? I have attached a screenshot also.
If you are not able to find out the current frame, can you tell me this with respect to number of images in the rotator and the current image in focus. I'm looking for a javascript.
Regards
Rahul
The below mention is the radrotator controls which I have created.
Javascript
<script type=
"text/javascript"
>
function
OnClientButtonClick(sender, args) {
// debugger;
var
currentIndex = sender.get_currentItem().get_index();
var
count = sender.get_items().length;
var
frames = Math.ceil(count / 3);
var
tot = 1;
if
(currentIndex % 3 == 0) {
tot = 2 + (sender.get_currentItem().get_index() / 3);
}
else
if
(currentIndex == 0)
tot = 1;
var
com = tot +
'/'
+ frames;
document.getElementById(
'<%= this.Label1.ClientID %>'
).innerHTML = com;
}
</script>
<telerik:RadRotator ID=
"ImageStrip_RadRotator"
InitialItemIndex=
"0"
runat=
"server"
RotatorType=
"CoverFlowButtons"
>
<ItemTemplate>
<telerik:RadBinaryImage ID=
"RadBinaryImage1"
CssClass=
"itemTemplate"
runat=
"server"
DataValue=
'<%# Eval("Photo") == DBNull.Value? new System.Byte[0]: Eval("Photo") %>'
AutoAdjustImageControlSize=
"false"
/>
</ItemTemplate>
<ControlButtons OnClientButtonClick=
"OnClientButtonClick"
/>
</telerik:RadRotator>
I have given the rotator dimensions and rotator type in .cs file,which is working fine. The rotator shows 3 images per frame.Suppose if there are 7 images then 3 frames will be shown. I'm getting the number of frames from "Var Frames" in the script.
What I want is that how to find the current frame if i move the left/right button in rotator ? I have attached a screenshot also.
If you are not able to find out the current frame, can you tell me this with respect to number of images in the rotator and the current image in focus. I'm looking for a javascript.
Regards
Rahul