Description box

4 posts, 0 answers
  1. Duy
    Duy  avatar
    68 posts
    Member since:
    Apr 2009

    Posted 20 Sep Link to this post

    Hi,

    Can description handle the html tag and also scrollable if out width and height.?

    thanks.

  2. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 23 Sep Link to this post

    Hello Duy,

    Here are some tips which will help you greatly when configuring the RadImageGallery control:

    1. CSS to modify the appearance. You can verify the result by adding it to the attached web site sample.
    Copy Code
    div.RadImageGallery div.rigDescriptionBox {
        background-color: red;
    }

    2. Print and Download functionality:
    http://www.telerik.com/support/code-library/add-print-and-save-buttons-in-radimagegallery-toolbar


    3. Display HTML content within the description box:
    Telerik.Web.UI.ImageGalleryImageArea.prototype._populateDescriptionBox = function (item) {
        if (!item) {
            return;
        }
        var owner = item.get_owner(),
            $element = owner._$element,
            $title = $element.find(".rigTitle"),
            $description = $element.find(".rigDescription"),
            title = item.get_title(),
            description = item.get_description();
        if (!title && !description) {
            $title.parent().hide();
        } else {
            $title.html(title);
            $description.html(description);
        }
    }

    Then, you can set the Title or Description field from your database in html format. Alternatively, you can format the text using the following handler:
    protected void RadImageGallery1_ItemDataBound(object sender, ImageGalleryItemEventArgs e)
    {
        e.Item.Title = string.Format("<a href='{0}'>{1}</a>",
              "http://en.wikipedia.org/wiki/" + e.Item.Title, e.Item.Title);
    }

    If you want to achieve dynamic background colorization requirement, you can try using the OnNavigated event handler:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/imagegallery/client-side-programming/events


    I hope this will prove helpful.


    Regards,
    Eyup
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Duy
    Duy  avatar
    68 posts
    Member since:
    Apr 2009

    Posted 27 Sep in reply to Eyup Link to this post

    Thanks Eyup, I got it working, however I have been playing the css to customize the Description Box  .rigDescriptionBox {
    padding:0 auto;
    margin:auto;
    background-color:Olive;
    display:block;
    }

    rigDescription{
    padding:6px;
    width:100%;
    height:100%;
    background-color:White;
    }
  5. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 30 Sep Link to this post

    Hi Duy,

    I'm glad the provided sample was helpful.
    Do you have a specific question related to the CSS or everything is fine now?

    Regards,
    Eyup
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top