Adding tooltip to combobox list dynamically

2 posts, 0 answers
  1. Ekjot
    Ekjot avatar
    24 posts
    Member since:
    Dec 2011

    Posted 11 Jul 2012 Link to this post


    I have searching around figuring out how to add tooltips to my dynamically generated radcomboxbox, but it's not working.

    I used the code in this article:

    http://www.telerik.com/support/kb/aspnet-ajax/tooltip/radtooltip-for-radcombobox.aspx

    but not tooltip shows up?



    My scenario is a little different. I have a grid and inside the edit template I have a RadComboBox that is generated with a Web Service and want to show a tooltip for that. Here is the code I have so far: 


    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0"
                       GridLines="None" EnableLinqExpressions="False"
                       onneeddatasource="RadGrid1_NeedDataSource">
                       <ClientSettings>
                           <Selecting CellSelectionMode="None"></Selecting>
                       </ClientSettings>
                       <MasterTableView CommandItemDisplay="Top" EditMode="PopUp">
                           <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                           <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                               <HeaderStyle Width="20px"></HeaderStyle>
                           </RowIndicatorColumn>
                           <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                               <HeaderStyle Width="20px"></HeaderStyle>
                           </ExpandCollapseColumn>
                           <Columns>
                               <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                               <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                                   ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                               <telerik:GridTemplateColumn FilterControlAltText="Filter cptcode column" HeaderText="Procedure Code"
                                   UniqueName="cptcode" DataField="cptcode">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter units column" HeaderText="Units"
                                   UniqueName="units" DataField="units">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter charges column" HeaderText="Charges"
                                   UniqueName="charges" DataField="charges">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter mod1 column" HeaderText="Mod 1"
                                   UniqueName="mod1" DataField="mod1">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter mod2 column" HeaderText="Mod 2"
                                   UniqueName="mod2" DataField="mod2">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter mod3 column" HeaderText="Mod 3"
                                   UniqueName="mod3" DataField="mod3">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter mod4 column" HeaderText="Mod 4"
                                   UniqueName="mod4" DataField="mod4">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter IcdCode1 column" HeaderText="ICD Code 1"
                                   UniqueName="IcdCode1" DataField="IcdCode1">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter IcdCode2 column" HeaderText="ICD Code 2"
                                   UniqueName="IcdCode2" DataField="IcdCode2">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter ICDCode3 column" HeaderText="ICD Code 3"
                                   UniqueName="ICDCode3" DataField="ICDCode3">
                               </telerik:GridTemplateColumn>
                               <telerik:GridTemplateColumn FilterControlAltText="Filter IcdCode4 column" HeaderText="ICD Code 4"
                                   UniqueName="IcdCode4" DataField="IcdCode4">
                               </telerik:GridTemplateColumn>
                           </Columns>
                           <EditFormSettings InsertCaption="Insert New CPT" PopUpSettings-Modal="true" EditFormType="Template">
                               <FormTemplate>
                               <table id="Table1" cellpadding="1" cellspacing="1" width="400" border="0">
                                
                               <tr>
                               <td>
                                
                               </td>
                               </tr>
     
                               <tr>
                               <td>
                               CPT Code:
                               </td>
                               <td>
                                   <telerik:RadComboBox ID="RadComboBox1" runat="server" EnableLoadOnDemand="true"
                           ShowMoreResultsBox="true" EnableVirtualScrolling="true" EmptyMessage="Enter here..."
                           DropDownWidth="170px">
                           <ItemTemplate>
                            
                           <asp:Label runat="server" ID="Label1" Text='<%# Eval("displayValue") %>'></asp:Label>
                           <telerik:RadToolTip ID="RadToolTip1" runat="server" Width="100" Height="10" TargetControlID="Label1"
                       Position="BottomRight" Text='<%# Eval("displayValue") %>'>
                   </telerik:RadToolTip>
     
                           </ItemTemplate>
                           <WebServiceSettings Path="/Services/WebServices.svc" Method="GetCPTCodes" />
                                   </telerik:RadComboBox>
                               </td>
                               </tr>
     
                               </table>
                               </FormTemplate>
                           </EditFormSettings>
                       </MasterTableView>
                       <FilterMenu EnableImageSprites="False">
                       </FilterMenu>
                   </telerik:RadGrid>


    What am I doing wrong? Or is this too complicated
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 12 Jul 2012 Link to this post

    Hello Ekjot,

    When RadComboBox is bound to web service the server item templates will not work. The following online demo shows an application scenario with client item templates which you can use in your application: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/clienttemplates/defaultcs.aspx.
    Here is a link to the online documentation as well: http://www.telerik.com/help/aspnet-ajax/combobox-client-templates-overview.html.

    I hope this will help.

    All the best,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top