I have a grid, inside one of the columns I have a tooltip that contains a radmenu. When you click an item in the radmenu I need it to call a JS method and pass the dataItem that the tooltip came from.
So lets say i have two rows in my grid with ID 1 and 2. If I hover over the second tooltip and click on my menu item it needs to pass the 2.
This is the last thing that is holding me up with this project. Please help...
So lets say i have two rows in my grid with ID 1 and 2. If I hover over the second tooltip and click on my menu item it needs to pass the 2.
This is the last thing that is holding me up with this project. Please help...
| <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server"> |
| <script type="text/javascript"> |
| //<![CDATA[ |
| function menuTools_Click(sender, eventArgs) |
| { |
| //I need the datakey from what ever dataitem this came from. |
| //So if I hover over the first 'hover over me' box and click the item I should get ID=0 |
| var id = 2; |
| var wnd = openRadWindow("http://www.google.com"+"?ID="+id, "600", "600"); |
| } |
| //]]> |
| </script> |
| </telerik:RadScriptBlock> |
| <telerik:RadGrid ID="Grid1" runat="server" AutoGenerateColumns="false" |
| OnDetailTableDataBind="DetailTableDataBind" |
| OnNeedDataSource="NeedDataSource"> |
| <MasterTableView DataKeyNames="ID" HierarchyLoadMode="ServerOnDemand"> |
| <DetailTables> |
| <telerik:GridTableView DataKeyNames="ID" ClientDataKeyNames="ID" AutoGenerateColumns="false"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" /> |
| </Columns> |
| </telerik:GridTableView> |
| </DetailTables> |
| <Columns> |
| <telerik:GridBoundColumn DataField="ID" HeaderText="ID" /> |
| <telerik:GridTemplateColumn> |
| <ItemTemplate> |
| <asp:Button ID="buttonDetails" runat="server" OnClientClick="return false;" Text="Hover over me" /> |
| <telerik:RadToolTip runat="server" ID="RadToolTipButtonDetails" HideEvent="ManualClose" RenderInPageRoot="true" |
| ShowEvent="OnMouseOver" RelativeTo="Element" TargetControlID="buttonDetails" Position="Center" Title="Tools"> |
| <telerik:RadMenu ID="menuTools" runat="server" Flow="Vertical" OnClientItemClicking="menuTools_Click"> |
| <Items> |
| <telerik:RadMenuItem Width="160px" Value="Print" ToolTip="Print" /> |
| </Items> |
| </telerik:RadMenu> |
| </telerik:RadToolTip> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings EnableRowHoverStyle="true"> |
| <Selecting AllowRowSelect="true" /> |
| </ClientSettings> |
| </telerik:RadGrid> |