RadLightBox Rebind

2 posts, 0 answers
  1. Alharith
    Alharith avatar
    15 posts
    Member since:
    Aug 2013

    Posted 24 Jan 2015 Link to this post

    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 ,

  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 28 Jan 2015 Link to this post

    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.

  3. DevCraft R3 2016 release webinar banner
Back to Top