RadToolTipManager not working with in Hierarchical RadGrid

6 posts, 0 answers
  1. atul
    atul avatar
    12 posts
    Member since:
    Jul 2008

    Posted 20 Feb 2009 Link to this post

    Hi

    I am using RADtooltipManager in Hierarchical  RADGrid, I am adding RadGrid column values(client IDs) as targetControld for Tooltip Manager in Grid's ItemDataBound Event and in AjaxUpdate event am loading a usercontrol into the update panel. so, when I mouse over to any item in the grid am getting a tooltip for that element. But when I click on expand button on  my radgrid to show data in child grid,I found that on submit of the page its not calling ItemDataBound event of the grid where I am adding targetcontrols to Tooltip manager.

    Any help is appreciated!

    Thanks
    Atul

  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 23 Feb 2009 Link to this post

    Hello Atul,

    I am not sure about your exact configuration and since I do not have your code I can only suggest to make sure that you have set  HierarchyLoadMode="ServerOnDemand" for the MasterTableView.

    If this does not help, please prepare a sample, fully runnable reproduction demo (use Northwind or a fake datasource), open a new support ticket and send it to me along with detailed reproduction steps and explanations of the actual and the desired behavior.

    Best wishes,
    Svetlina
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vijay
    Vijay avatar
    1 posts
    Member since:
    Sep 2012

    Posted 13 Sep 2012 Link to this post

     
     

     

    ASPX Page

    <telerik:RadGrid ID="radGrid" runat="server" AllowSorting="True" AllowPaging="True" 

    PageSize="25" CellSpacing="0" GridLines="None"

    AutoGenerateColumns="False" Skin="Outlook" 

    OnNeedDataSource="radGrid_NeedDataSource" OnDetailTableDataBind="radGrid_DetailTableDataBind" 

    EnableLinqExpressions="false" ShowStatusBar="True" OnPreRender="radGrid_PreRender" 

    CausesValidation="False" 

    onitemdatabound="radGrid_ItemDataBound"> 

    <MasterTableView Width="100%" DataKeyNames="BookingID" AllowMultiColumnSorting="false" Name="Booking" HierarchyLoadMode="ServerOnDemand"> 

    <DetailTables> 

    <telerik:GridTableView DataKeyNames="DetailId" Name="DetailId" Width="100%" ToolTip="Resource Booked Details" >

    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> 

    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> 

    </RowIndicatorColumn> 

    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> 

     </ExpandCollapseColumn>

    <Columns>

    <telerik:GridTemplateColumn HeaderText="Select" UniqueName="DetailId"> 

    <ItemTemplate> 

    <asp:Label ID="lblDetailID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"DetailId")%>' /> 

    <asp:HiddenField ID="hdnJDBookedDetailID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem,"DetailId")%>' /> 

    </ItemTemplate> 

    <HeaderStyle Width="6%" HorizontalAlign="Center" /> 

    <ItemStyle HorizontalAlign="Center"></ItemStyle> 

    </telerik:GridTemplateColumn> 

    <telerik:GridBoundColumn DataField="EmpCode" HeaderText="EmpCode" HeaderTooltip="Employee Code" 

    UniqueName="EmpCode" HeaderStyle-Wrap="false"> 

    <HeaderStyle Wrap="False"></HeaderStyle> 

    </telerik:GridBoundColumn> 

    <telerik:GridBoundColumn DataField="EmpName" HeaderText="Employee Name" HeaderTooltip="Employee Name" 

    UniqueName="EmpName" />

    <telerik:GridBoundColumn DataField="BookingDate" HeaderText="Booked Date" HeaderTooltip="Booked Date" 

    UniqueName="BookingDate" DataFormatString="{0:dd-MMM-yyyy}" /> 

    <telerik:GridBoundColumn DataField="BookedStatus" HeaderText="Booked Status" HeaderTooltip="Booked Status" 

    UniqueName="BookedStatus" /> 

    <telerik:GridTemplateColumn HeaderText="Resource Info." UniqueName="ChkResource"> 

    <ItemTemplate> 

    <asp:Image ID="imgResourceInfo" runat="server" ImageUrl="~/local/images/jd.png" /> 

    </ItemTemplate> 

    <HeaderStyle Width="16%" HorizontalAlign="Center" /> 

    <ItemStyle HorizontalAlign="Center" /> 

    </telerik:GridTemplateColumn> 

    </Columns>

    <EditFormSettings> 

    <EditColumn FilterControlAltText="Filter EditCommandColumn column"> 
    </EditColumn> 

    </EditFormSettings> 

    <PagerStyle AlwaysVisible="True"></PagerStyle> 

    </telerik:GridTableView> 

    </DetailTables>
    <NoRecordsTemplate>

    <center>
    <asp:Label ID="lblNoRecords" runat="server" Font-Bold="false" Font-Size="12px" ForeColor="#000000"

    Text="Currently no records found!."></asp:Label>

    </center>

    </NoRecordsTemplate>

    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">

    <HeaderStyle Width="20px"></HeaderStyle>

    </RowIndicatorColumn>

    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>

    <Columns>

    <telerik:GridBoundColumn DataField="BookingID" HeaderText="Booking ID" HeaderTooltip="Booking ID"

    UniqueName="BookingID">

    <HeaderStyle Width="6%" HorizontalAlign="Center" />

    <ItemStyle HorizontalAlign="Center" /> 

    </telerik:GridBoundColumn> 

    <telerik:GridBoundColumn DataField="Code" HeaderText="Code" HeaderTooltip="ID"

    UniqueName="Code" HeaderStyle-Wrap="false">

    <HeaderStyle Width="12%" />
    </telerik:GridBoundColumn>

    <telerik:GridBoundColumn DataField="Name" HeaderText="Name"
    HeaderTooltip="Name" UniqueName="Name" />
    <telerik:GridBoundColumn DataField="JobName" HeaderText="Job Name" HeaderTooltip="Job Name"

    UniqueName="JobName" />

    <telerik:GridBoundColumn DataField="BookingDate" HeaderText="Booked Date" HeaderTooltip="Booked Date"

    UniqueName="BookingDate" DataFormatString="{0:dd-MMM-yyyy}" />

    </Columns>

    <EditFormSettings>

    <EditColumn FilterControlAltText="Filter EditCommandColumn column">

    </EditColumn>

    </EditFormSettings>

    <PagerStyle AlwaysVisible="True"></PagerStyle>

    </MasterTableView>
    <PagerStyle AlwaysVisible="True" />

    <FilterMenu EnableImageSprites="False">

    </FilterMenu>
    <HeaderContextMenu CssClass=GridContextMenu GridContextMenu_Outlook">
     </HeaderContextMenu>

    </telerik:RadGrid>

    </div>
    <telerik:RadToolTipManager ID="rptInfo" runat="server" Position="BottomCenter"

    Animation="Fade" RelativeTo="Element" OffsetX="0" OffsetY="0" Style="font-size: 18px;

    text-align: center; font-family: Arial;" Width="400px" RenderInPageRoot="true"

    AutoCloseDelay="100000">
    <WebServiceSettings Method="GetToolTipData" Path="~/CascadingDataServices.asmx" />
     </telerik:RadToolTipManager>

     

    CODE BEHIND

    if (e.Item.OwnerTableView.Name == "DetailId")

    {

    switch (e.Item.ItemType)
    {

    case GridItemType.Item:
    case GridItemType.AlternatingItem:

    Label lblDetailID = (Label)e.Item.FindControl("lblbookinginDetailID");

    Image imgResourceInfo = (Image)e.Item.FindControl("imgResourceInfo") ?? null;

    GridDataItem dataItem = (GridDataItem)e.Item;

    if (!string.IsNullOrEmpty(lblbookinginDetailID.Text))

    {

    var contextValue = lbletailID.Text;

    rptResourceBookedInfo.TargetControls.Add(imgResourceInfo.ClientID, contextValue, true);

    }

     break;

     
    default:

    break;

    }

     
    The above coding will be working fine in Mastergrid view,But In GridTableView is not working,Even webservice method also not triggered.advance Thanks

     

     

     

  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 14 Sep 2012 Link to this post

    Hello Vijay,

    What I can advise is that you debug your code and see what you are passing to the RadToolTipManager and perhaps add a check if the image you are seeking has been found before adding it as a target control. You should also make sure the grid is bound on the server, so that the event handler that executes your code is called. Another thing that can break your logic is AJAX - if you are using AJAX you need to include the RadToolTipManager in the partial update so that it receives its new targets. An example of all three points is available in this online demo.


    Kind regards,
    Marin Bratanov
    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.
  6. Rory
    Rory avatar
    159 posts
    Member since:
    Jul 2007

    Posted 13 Aug 2014 Link to this post

    The code from your demo works fine for us in a One level grid but if I place this logic against a detailstable the code doesn't work. I can see the popup but in the RadToolTipMgr_AjaxUpdate event when I add any control with this code, e.UpdatePanel.ContentTemplateContainer.Controls.Add(userControl); the grid updates all of those columns to look like disabled checkboxes and the tooltip never shows.

    Please advise. 
  7. Rory
    Rory avatar
    159 posts
    Member since:
    Jul 2007

    Posted 13 Aug 2014 in reply to Rory Link to this post

    Never mind, I fixed my own issue!

    Apparently the ordering of the AjaxSettings nodes in the RadAjaxManager can break the tooltip. I had to make sure that the AjaxSetting that points to my RadAjaxManager was before the AjaxSetting that points to my RadGrid.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017