1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / ToolTip for Lists Templates GC Modules

ToolTip for Lists Templates GC Modules

4 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    16 Jun 2009
    Link to this post
    Hi,

    Could you help us to add one ToolTip linked to Title in List Templates for GC Modules using some item like one Metafields or Thumbnails. I have one biggest list that make very difficult link or select the good content in the listing. One Tooltip with some complementary content is one good solution client side.
    Thanks for your help.
    Regards
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    16 Jun 2009
    Link to this post
    Hello Pierre,

    I am not sure what you mean by "one ToolTip linked to Title in List Templates". Could you please elaborate on the scenario?

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    16 Jun 2009
    Link to this post
    Hi Georgi,

    ListTemplates in generic contents modules use RadGrid binding client side to expose the items. I like add one onmouseover with ToolTip to "Title" item in RadGrid and open the Tooltip using some webservice one complementary information inside from Metafields. I have tried the samples found in demo site using webservices and radToolTipClientApi but is not completly clear for me.

    How to link the tooltip in this configuration :
    <telerik:ClientTemplatesHolder ID="GridTemplates" runat="server">  
            <telerik:ClientTemplate Name="Edit" runat="server">  
                <href="<%= ((Telerik.News.WebControls.Admin.NewsItemsList)Parent.Parent).ItemEditUrl %>"></a>  
            </telerik:ClientTemplate> 
    Need to create complete webservice or can use the found-it to GetContents() botton in this template. Could you expose some easier way, plz.
    Thanks.
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    17 Jun 2009
    Link to this post
    Hi Pierre,

    I see.

    This is possible. The first thing you need to do is defining which MetaFields you want the WebService to return. Open the ContentItemLists.ascx - this is the control template of the Generic Content module, in mode Lists. Then find the following snippet:
    function DataBindGrid(currentPageIndex, pageSize, sortExpressionsAsSQL, filterExpressionsAsSQL) { 
        var requiredMetaFields = ['Name''Author''Description']; 
        var cultureInfoField = document.getElementById('<%= cultureInfoField.ClientID %>'); 
        Telerik.Cms.Engine.Services.ContentService.GetContentItems(currentPageIndex * pageSize, pageSize, 
        sortExpressionsAsSQL, filterExpressionsAsSQL, requiredMetaFields, cultureInfoField.value, dataProviderName, updateGrid, OnFailed); 
     
    The requiredMetaFields is a collection of the metafields that the ContentService should return to the grid. Later on, the Grid is bound to these items and the metafields are showed to their respective places. Add the metafield you want here.

    The next thing you should do is to bind a RadTool tip, or use the RadGrid's tooltip property in order to show the tooltip returned by the web service. Just take a look how the rest of the fields are bound, and do the same for the tooltip metafield. You might for example have additional column which will save the tooltip, and OnMouseOver, take the value of this column and show it any place you would like.

    Regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered