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

Client Side Scripting

4 Answers 139 Views
ImageGallery
This is a migrated thread and some comments may be shown as answers.
Majid
Top achievements
Rank 1
Majid asked on 25 Mar 2014, 01:01 PM
Hi,

I was trying to use the client side script for image gallery set to work as light, I have couple of queries.

1. I have added a client script for OnImageLoaded, the script is not getting executed when the light box load the image on user click on the thumbnail. 

<telerik:RadImageGallery ID="RadImageGallery1" runat="server" AllowPaging="true"
DisplayAreaMode="LightBox" ImagesFolderPath="~\Images"
Skin="Glow" >
<ClientSettings>
<ClientEvents
OnImageLoaded="imageLoaded"  />
</ClientSettings>
</telerik:RadImageGallery>

function imageLoaded(sender, args) {
alert("ImageLoaded");
// var imageItem = args.get_item(); }

2. Can we add controls to the light box inside the image gallery similar to the AsyncUpload and get the value in the back end using GetFieldValue.

Thank you.

Regards,
Majid

4 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 28 Mar 2014, 12:52 PM
Hi Majid,
 
1. The mentioned  client event is not implemented in the RadLightBox control and in case the DisplayAreaMode is set to "LightBox" the event does not fire. I have added this request as feature request to our system and our Dev team will discuss its possible implementation.
You could follow the mentioned item using the link bellow:

http://feedback.telerik.com/Project/108/Feedback/Details/124303-add-imageloaded-client-event-to-lightbox-and-integration-with-imagegallery

2. As for the upload functionality such feature is currently not supported as built in LightBox functionality and we do not plans its implementation in some of the upcoming releases.

Regards,
Maria Ilieva
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Majid
Top achievements
Rank 1
answered on 31 Mar 2014, 07:09 AM
Hi Maria,

Thanks a lot for your reply.

In our scenario, we would like to show all the pictures uploaded by the user as a gallery, the user should be provided with an option to select one or more pictures and delete those. We have to show pictures as grouped into different category. Currently we tried to use the thumbnail view of the image gallery control and it is quite fine, but practically facing difficulties in providing an option to delete.

Could you kindly suggest a control that can be best fitted for this scenario.

Regards,
Majid

 
0
Majid
Top achievements
Rank 1
answered on 31 Mar 2014, 07:15 AM
Hi Maria,

Thanks a lot for your response.

In our scenario, we would like to show the pictures uploaded by the user for a particular site grouped into different category ( like front elevation, back side view, front garden etc). We used thumbnail feature to show the images for each category and it is quite fine. The user should be provided with an option to delete one or more pictures that he uploaded, partially we are facing difficulty in implementing delete option using image gallery.

Could you kindly guide us on what could be the control that best fit for this scenario.

Regards,
Majid 
0
Radoslav
Telerik team
answered on 03 Apr 2014, 10:39 AM
Hi Majid,

The image gallery control is designed only to preview and show details for the images.  It does not have CRUD operations implemented. In order to insert/delete/update image you need to implement some external form with these operations, which depends on the selected image from the ImageGallery control.
The other option is to use our RadListView control and add different templates. It supports crud operations and you can define different templates for selected items, insert item, edit item, etc.
For example into the item template you can add only an image and delete button. Examples with crud operations you can find here:
http://demos.telerik.com/aspnet-ajax/listview/examples/dataediting/net2automaticdataediting/defaultcs.aspx
Also you can implement functionality for selecting certain items and then delete all selected images. Example which uses selection can be found here:
http://demos.telerik.com/aspnet-ajax/listview/examples/selecting/defaultcs.aspx
Also on the following link you can find example which shows only images into the RadListView control with enabled selection:
http://demos.telerik.com/aspnet-ajax/ziplibrary/examples/overview/defaultcs.aspx#qsf-demo-source

I hope this helps.

Regards,
Radoslav
Telerik
 

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.

 
Tags
ImageGallery
Asked by
Majid
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Majid
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or