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

RadLightBox Rebind

1 Answer 17 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Alharith asked on 25 Jan 2015, 04:45 AM
Hello ,
im Trying to use RadLightBox to show some pictures for different items so on click i need to change hidden field value and rebind the list .
so how can i rebind the light box from client side.

JS Code
function OpenImages(ItemID) {
$('#<%= hdnItemID.ClientID%>').val(ItemID);

var rlbItemImages = $find('<%= rlbItemImages.ClientID%>');

RadLightBox Code
<telerik:RadLightBox ID="rlbItemImages" runat="server" DataSourceID="odsItemImages" ShowLoadingPanel="true"
EnableAjaxSkinRendering="true" RegisterWithScriptManager="true"
DataImageUrlField="ItemPath" DataDescriptionField="ItemPath" DataTitleField="ItemPath">

Object DataSource Code

<asp:ObjectDataSource ID="odsItemImages" runat="server" SelectMethod="QueryDatabase" TypeName="AdoClass.DBitemsImagesSP" OldValuesParameterFormatString="original_{0}">
<asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
<asp:Parameter Name="ID" Type="String" />
<asp:ControlParameter ControlID="hdnItemID" Name="ItemID" PropertyName="Value" Type="String" />
<asp:Parameter DefaultValue="" Name="ItemImage" Type="Object" />
<asp:Parameter Name="ItemPath" Type="String" />
<asp:Parameter DefaultValue="rtvImagesPaths" Name="Operation" Type="String" />
<asp:HiddenField runat="server" ID="hdnItemID" />

Regards ,

1 Answer, 1 is accepted

Sort by
Maria Ilieva
Telerik team
answered on 28 Jan 2015, 02:56 PM
Hi Alharith,

I revise the provided details, however I'm not completely sure what exact functionality you need to achieve is. You can take the item id and save it into the hidden field but, why you need to rebind the RadLightBox on the client?
If your logic requires rebind and then executing of some client logic you can initiate ajaxRequest() from the client, rebind the LightBox on the server and then register client script to execute the show() action.

Maria Ilieva

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question