Hello,
I'm using RadRotator to display image and its ID from DB:
There is a button on my WebPage which deletes record from DB. I use ajax request of RadAjaxManager:
On Server side I delete record and do
So the rotator updates itself.
Everything works fine, except every time when I delete a record, I need to scroll back to the last position.
Imagine hundreds of images, I scroll through them, find one to delete, and then scroll again. A bit annoying.
I tried to set InitialItemIndex, but I've got mess
I tried to addCssClass, and was able to hide image, but it left empty cell in rotator.
So my question is there a way I can remove item from rotator on client side?
Thank you.
Regards,
Sergei
I'm using RadRotator to display image and its ID from DB:
<
telerik:RadRotator
ID
=
"thumbRotator"
runat
=
"server"
RotatorType
=
"Buttons"
WrapFrames
=
"false"
Width
=
"750px"
Height
=
"150px"
ItemWidth
=
"150px"
ItemHeight
=
"150px"
>
<
ItemTemplate
>
<
img
id
=
"imgAvatar"
src='ViewImage.ashx?avatar=<%# Eval("ID") %>&width=150&height=150'
alt="Avatar Image" style="border: 0px; cursor:pointer;" />
<
label
id
=
"label1"
runat
=
"server"
title='<%# Eval("ID") %>'>
</
label
>
</
ItemTemplate
>
<
ControlButtons
LeftButtonID
=
"img_left"
RightButtonID
=
"img_right"
/>
</
telerik:RadRotator
>
function
confirmCallBackFn(arg) {
if
(arg) {
var
id = HiddenField.Get(
'ID'
);
if
(id > 0) {
var
ajaxManager = $find(
"<%= RadAjaxManager1.ClientID %>"
);
ajaxManager.ajaxRequest(
'delete:'
+ id);
}
}
}
On Server side I delete record and do
thumbRotator.DataBind();
Everything works fine, except every time when I delete a record, I need to scroll back to the last position.
Imagine hundreds of images, I scroll through them, find one to delete, and then scroll again. A bit annoying.
I tried to set InitialItemIndex, but I've got mess
I tried to addCssClass, and was able to hide image, but it left empty cell in rotator.
So my question is there a way I can remove item from rotator on client side?
Thank you.
Regards,
Sergei