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

Title TAG in HTML

8 Answers 103 Views
ImageGallery
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 30 Oct 2015, 01:19 PM

Hello Telerik Team,

 i want to use RadImageGallery ​​in the LightBox AreaMode. The problem is, that in the HTML only the ALT tag is generated. But i want also the TITLE tag. 

 Is there any chance for this?

 

My second question is, how can i change the NavigationUrl, if im binding binary image from data source.

Best wishes,
Nick

01.<telerik:RadImageGallery runat="server" ID="Gallery"
02.    DataImageField="Image"
03.    DataTitleField="Name"
04.    DataKeyNames="ArtistId"
05.    DisplayAreaMode="LightBox"
06.    OnNeedDataSource="NeedDataSource"
07.    Width="100%" RenderMode="Auto">
08.    <ThumbnailsAreaSettings ScrollOrientation="Vertical" ShowScrollButtons="false" Height="100%"
09.        Mode="Thumbnails" ThumbnailWidth="140px" ThumbnailHeight="140px" />
10.    <ImageAreaSettings />
11.</telerik:RadImageGallery>

 

8 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 04 Nov 2015, 12:23 PM
Hello Nick,

I am afraid that the title attribute for the image is not rendered by default. If you would like such modification to be implemented you can submit a feature request in our Ideas & Feedback portal.

With that said, if you would like the image element to have title you can add a bit of custom logic and set the title via jQuery.

Regarding your second query. In order to set the NavigateUrl for the images you can use the ItemDataBound event of RadImageGallery. You can check what is the current item that is being bound and set the NavigateUrl for it. Then, on the client you can use the OnNavigating event and redirect the page when the user clicks on the image.

For your convenience I am attaching a sample project where both suggestions are implemented. Give it a try and let me know how it works for you.

Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Nick
Top achievements
Rank 1
answered on 03 Dec 2015, 05:04 AM

Hello Viktor,

 thank you for your help. Now i have a another issue with my gallery.

 Please see the attached screenshot. Sometimes the thumbnails cant be loaded. Ill have tried something but without effect. The problem exists not in my development enviroment only on the server.

Do you have any ideas, to solve the problem.

Best wishes,

Nick

 

<telerik:RadImageGallery runat="server" ID="AttractionsGallery"
    DataImageField="Image"
    DataTitleField="ArtistNameWithoutDiskografisi"
    DataDescriptionField="ArtistNameWithoutDiskografisi"
    DataKeyNames="ArtistId"
    DisplayAreaMode="LightBox"
    OnNeedDataSource="AttractionsGallery_NeedDataSource"
    OnItemDataBound="AttractionsGallery_ItemDataBound"
    Width="100%" RenderMode="Auto">
    <ThumbnailsAreaSettings ScrollOrientation="Vertical" ShowScrollButtons="false" Height="100%"
        Mode="Thumbnails" ThumbnailWidth="140px" ThumbnailHeight="140px" />
    <ImageAreaSettings />
    <ClientSettings>
        <ClientEvents OnNavigating="TX.navigating"  />
    </ClientSettings>
</telerik:RadImageGallery>
protected void AttractionsGallery_NeedDataSource(object sender, ImageGalleryNeedDataSourceEventArgs e)
{
    AttractionsGallery.DataSource = Artist.GetArtistByLetter(Request.QueryString["letter"]);
}
 
protected void RadAjaxPanel1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    var disco = e.Argument.Split(new[] { '/' }).Last();
    Response.Redirect("~/Pages/Discography.aspx?disco=" + disco + " Diskografisi");
}

0
Nick
Top achievements
Rank 1
answered on 03 Dec 2015, 12:56 PM

Maybe this is helpful. 

[ViewStateException: Invalid viewstate.
 
Client IP: 212.23.154.138 Port: 64749
 
Path: /Pages/List.aspx
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/47.0.2526.73 Safari/537.36
ViewState: /wEPDwULLTE3ODU5MDUxNTYPZBYCZg8PFgQeD19fQW50aVhzcmZUb2tlbgUgNWZlYTcxZWExZTRkNGIwMDhkZDY3MzFmNzhhZjliZTIeEl9fQW50aVhzcmZVc2VyTmFtZWVkFgICAw9kFgICAg8PFgQeCENzc0NsYXNzBQ10eF9pbm5lcl9wYWdlHgRfIVNCAgJkFgRmD2QWAmYPZBYEAgEPFCsAAhQrAAIPFgYeFUVuYWJsZUVtYmVkZGVkU2NyaXB0c2ceHEVuYWJsZUVtYmVkZGVkQmFzZVN0eWxlc2hlZXRnHhJSZXNvbHZlZFJlbmRlck1vZGULKXJUZWxlcmlrLldlYi5VSS5SZW5kZXJNb2RlLCBUZWxlcmlrLldlYi5VSSwgVmVyc2lvbj0yMDE1LjMuOTMwLjQ1LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTEyMWZhZTc4MTY1YmEzZDQCZBAWBGYCAQICAgMWBBQrAAJkZBQrAAJkZBQrAAJkZBQrAAJkZA8WBGZmZmYWAQVzVGVsZXJpay5XZWIuVUkuUmFkTWVudUl0ZW0sIFRlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMTUuMy45MzAuNDUsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MTIxZmFlNzgxNjViYTNkNGQWBAIBD2QWAmYPZBYCAgEPFCsAAhQrAAIPFgYfBGcfBWcf...]

 

0
Viktor Tachev
Telerik team
answered on 07 Dec 2015, 01:33 PM
Hi Nick,

From the screenshot it seems that the images are not loaded. This could happen if they are not accessible. Please make sure that the location of the images can be accessed from the server.

Also the ViewState error seems strange. Would you elaborate in more detail on how it can be replicated?

Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Nick
Top achievements
Rank 1
answered on 12 Dec 2015, 10:15 AM

Hello Viktor,

 there a no locations. The images came from the database as bytes.The problem occurs in 10 views 1 or 2 times.

Best wishes,

Nick

0
Viktor Tachev
Telerik team
answered on 16 Dec 2015, 09:41 AM
Hello Nick,

If the images are coming from a database this could indicate that the images are not retrieved from the data source. Or that the format of the image is not correct.



Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Nick
Top achievements
Rank 1
answered on 16 Dec 2015, 11:56 AM

Hello Viktor,

format is ok. After a refresh all is fine. The error occurs sometimes, sometimes not.

 Best wishes,

Ercan

0
Viktor Tachev
Telerik team
answered on 18 Dec 2015, 02:17 PM
Hello Ercan,

The behavior you describe seems like a network/timeout issue. Something most likely prevents the images from loading. However, it will be hard to determine what is the root cause of the behavior.

Please examine the network tab in the developer tools of the browser and see if there are any errors. Also try to run a profiler tool for the database and ensure that the data is queried and returned correctly.

Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ImageGallery
Asked by
Nick
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Nick
Top achievements
Rank 1
Share this question
or