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

RadToolTipManager not working with in Hierarchical RadGrid

5 Answers 104 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
atul
Top achievements
Rank 1
atul asked on 20 Feb 2009, 07:01 AM
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

5 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 23 Feb 2009, 11:08 AM
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.
0
Vijay
Top achievements
Rank 1
answered on 13 Sep 2012, 09:52 AM

 
 

 

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

 

 

 

0
Marin Bratanov
Telerik team
answered on 14 Sep 2012, 11:12 AM
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.
0
Rory
Top achievements
Rank 1
answered on 13 Aug 2014, 03:38 PM
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. 
0
Rory
Top achievements
Rank 1
answered on 13 Aug 2014, 04:43 PM
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.
Tags
ToolTip
Asked by
atul
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Vijay
Top achievements
Rank 1
Marin Bratanov
Telerik team
Rory
Top achievements
Rank 1
Share this question
or