| <script type="text/javascript"> |
| function DisplayDetails() |
| { |
| var divDetails = document.getElementById('divDetails'); |
| divDetails.style.display = "inline"; |
| } |
| function CloseActiveToolTip() |
| { |
| setTimeout(function(){ |
| var tooltip = Telerik.Web.UI.RadToolTip.getCurrent(); |
| if (tooltip) tooltip.hide(); |
| }, 1000); |
| } |
| function showToolTip(element,cntid) |
| { |
| var tooltipManager = $find("<%= RadToolTipManager1.ClientID %>"); |
| if (!tooltipManager) return; |
| var tooltip = tooltipManager.getToolTipByElement(element); |
| if (!tooltip) |
| { |
| tooltip = tooltipManager.createToolTip(element); |
| tooltip.set_value(cntid); |
| } |
| element.onmouseover = null; |
| tooltip.show(); |
| } |
| </script> |
| <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="right" |
| RelativeTo="Element" Width="350px" Height="260px" Animation="Resize" HideEvent="LeaveToolTip" |
| Skin="WebBlue"> |
| <WebServiceSettings Path="~/WebService.asmx" Method="GetCartesPubReg" Runat="Server" /> |
| </telerik:RadToolTipManager> |
| <telerik:ClientTemplate Name="View" runat="server"> |
| <a href="ItemViewUrl" onmouseover="showToolTip(this,'{#ID#}');">{#MetaFields.Title#}</a> |
| </telerik:ClientTemplate> |
OK you may be confused by the title of the post, but I didn't really know how to express a good title for the post.
Here's what I have, I've got a nested grid in a grid and on events such as item_databound of the nested grid I need to find the parent row of the nested grid.
I've found a convoluted way in finding it, but I'm sure there's a simpler way, here's how I do it on the item_databound:
DirectCast(e.Item.Parent.Parent.Parent.Parent.Parent.Parent, Telerik.Web.UI.GridNestedViewItem).ParentItem
I have a similar convoluted way in getting this in a rowdrop event from the nested grid's
DirectCast(e.DragedItems(0).Parent.Parent.Parent.Parent.Parent.Parent, Telerik.Web.UI.GridNestedViewItem).ParentItem
Here's a quick example of what I'm doing:
| Public Sub rdgInvoices_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) 'Handles rdgInvoices.ItemDataBound |
| Static Total As Double |
| If TypeOf e.Item Is Telerik.Web.UI.GridDataItem Then |
| (e.Item.Parent, "TelerikForAjax") |
| Dim gdiParent As Telerik.Web.UI.GridDataItem = DirectCast(e.Item.Parent.Parent.Parent.Parent.Parent.Parent, Telerik.Web.UI.GridNestedViewItem).ParentItem |
| If DirectCast(gdiParent.FindControl("lblDirectExpense"), Label).Text = "1" OrElse DirectCast(e.Item.FindControl("lblDirectExpense"), Label).Text = "1" Then |
| With e.Item |
| DirectCast(.FindControl("lblInvoice"), Label).Visible = False |
| With DirectCast(.FindControl("txtInvoice"), TextBox) |
| .Visible = True |
| ' ''On Error Resume Next |
| ' ''.Attributes.Remove("updateDE") |
| ' ''On Error GoTo 0 |
| ' ''.Attributes.Add("onChange", "updateDE('" & directcast(e.Item.FindControl("txtInvoice"), Label).ClientID & "', '" & & "')") |
| End With |
| Dim rdg As Telerik.Web.UI.GridDataItem = ParentRow(e.Item.Parent, "TelerikForAjax") |
| With DirectCast(.FindControl("txtAmount"), TextBox) |
| .Attributes.Add("onChange", "updateDE('" & DirectCast(e.Item.FindControl("lblAmount"), Label).ClientID & "','" & DirectCast(.FindControl("txtAmount"), TextBox).ClientID & "', '" & DirectCast(rdgCategoryBudget.Items(CurrentCategoryRow).FindControl("txtReconciled"), TextBox).ClientID & "', '" & DirectCast(rdg.FindControl("txtReconciled"), TextBox).ClientID & "', '" & DirectCast(rdgCategoryBudget.Items(CurrentCategoryRow).FindControl("lblSavings"), Label).ClientID & "', '" & DirectCast(rdgCategoryBudget.Items(CurrentCategoryRow).FindControl("lblTotal"), Label).ClientID & "')") |
| .ReadOnly = Not AllowReconciliation |
| End With |
| End With |
| End If |
| End Sub |
| <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Transparency="75" |
| MinDisplayTime="500" BackColor="#E0E0E0"> |
| <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading6.gif") %>' |
| alt="Loading..." style="border: 0; margin-top: 40px;" /> |
| </telerik:RadAjaxLoadingPanel> |
RadioButtonList myRadioBtnListTipo = (RadioButtonList) FichaContedo.FindControl("RadioBtnListTipo");
Thank you for your help!
Marta