Access Unique DataKeyValue and Delete Images from RadImageGallery Bound to a Data source

Thread is closed for posting
1 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 02 Jul 2015 Link to this post


    Telerik Product and Version


    Supported Browsers and Platforms

    FF - current and previous
    Chrome - current and previous

    Programming language

    C#, VB


    When RadImageGallery is bound to a database either by using its DataSourceID property or programmatically using NeedDataSource event handler, you can access the Description, ImageUrl and Title properties exposed by the ImageGalleryItem class respectively filled with values coming from the DataDescriptionField, DataImageField, DataTitleField settings of the RadImageGallery. The attached web site demonstrates how to access any other field value from the related data source record by adding the fields in the DataKeyNames collection.

    There are two specific points to be noted when deleting the selected Image:
    • EnableViewState should be set to False
    • CurrentItemIndex should be reset to 0

Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.