Couple Things

3 posts, 0 answers
  1. SDI
    SDI avatar
    107 posts
    Member since:
    Nov 2011

    Posted 26 Jun 2014 Link to this post

    Hi Telerik,

    I find limited resources on the Gallery, as far as the client object is concerned and trying to get information out of it. In otherwords, finding the text, description, etc of the currently selected image. I cant seem to get this information from the argument in the OnNavigated function. If you have documentation on it please lead me to it.

    Ok, I want the OnNavigated to update other controls on the screen once that image is selected. I have textboxes and a check box that should update after the image is chosen to view. The server event - Image requested  gets hit only the first time around. So i need this event to update other controls on the screen.

    <telerik:RadImageGallery ID="ImageGallery1" DataKeyNames="MemberImageId, IsPrimary, Name, Description" runat="server" Height="400px" LoopItems="true" Skin="Web20">
        <ThumbnailsAreaSettings ThumbnailsSpacing="5px" />
            <ClientEvents OnNavigated="OnNavigated" />
        <ImageAreaSettings ShowDescriptionBox="false" />                   

    JS function
    function OnNavigated(sender, args) {
        $find('<%=RadTextBoxDescription.ClientID%>').set_value('Try Desc');
        $find('<%=RadTextBoxName.ClientID%>').set_value('Try Name');

    I obviously want the 4 objects to be updated when the next/previous/other image is selected. Not the hard coded values you see. Maybe the key names have values in the js side? Like other controls, but client datakey is used. I dont see any help on the matter.

    Can you guys/girls lead me in the right direction?

    Thanks a bunch!

  2. SDI
    SDI avatar
    107 posts
    Member since:
    Nov 2011

    Posted 30 Jun 2014 in reply to SDI Link to this post

    Okay i found the code for getting the title and the description

    I do have a problem and that is getting other fields in the query to pull back the images. The primary key id , a boolean field, plus a sort order. This the ImageGalleryItem doest seem to support attributes like the rest of your controls. Can you please tell me how i can attach other values to the ImageGalleryItem? Maybe in the ItemCreated event or something on the server side. Its doesnt look like you have the ClientDataKey etither. 

  3. Angel Petrov
    Angel Petrov avatar
    1141 posts

    Posted 01 Jul 2014 Link to this post

    Hello Brian,

    I am sorry to say but with the current implementation there is no out of the box way to pass additional parameters to the client-side. In order to achieve the desired goal you can use the obtained  title and description and fire an AJAX request or callback that would return the additional data. An example of this approach is available in the attached website.

    Please note that I have logged a feature request regarding the ClientDataKeyNames functionality and you can vote for it from here. The more votes the feedback item receives the higher the chance of implementing the feature for the next release.

    Angel Petrov

    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.

Back to Top