or
<telerik:RadGrid ID="radGrid" OnItemDataBound="radGrid_ItemDataBound" OnItemCommand="radGrid_ItemCommand"> <MasterTableView > <Columns> ... </Columns> <NestedViewTemplate> <ParteControl:ParteControl id="ctl" visible="false" runat="server"/> </NestedViewTemplate> </MasterTableView> </telerik:RadGrid>protected void radGrid_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { if (e.CommandName == Telerik.Web.UI.RadGrid.ExpandCollapseCommandName) { if (!e.Item.Expanded) { Label lblId = (Label)e.Item.OwnerTableView.Items[e.Item.ItemIndex]["Info"].FindControl("lblId"); controls_partescontrol ctl = (controls_partescontrol)((Telerik.Web.UI.GridDataItem)e.Item).ChildItem.FindControl("ctl"); String[] arrValues; String srtValues = lblId.Text.ToString(); arrValues = srtValues.Split('#'); ctl.Pre(); ctl.Visible = true; ctl.Value = arrValues[0].ToString(); ctl.Coluna = arrValues[1].ToString(); ctl.Load(); } } }<telerik:RadContextMenu ID="ctxMenu" runat="server"> <Targets> <telerik:ContextMenuControlTarget ControlID="ajaxPanel" /> </Targets> <Items> <telerik:RadMenuItem> <ItemTemplate> <asp:LinkButton ID="lnk_1" OnClientClick="javascript: callHoldInfo(this,'Parte');" OnCommand="Menu_ItemClick" CommandArgument="0" runat="server" style="text-decoration: none !important;"></asp:LinkButton> </ItemTemplate> </telerik:RadMenuItem> <telerik:RadMenuItem> <ItemTemplate> <asp:LinkButton ID="lnk_2" OnCommand="Menu_ItemClick" CommandArgument="1" runat="server" style="text-decoration: none !important;"></asp:LinkButton> </ItemTemplate> </telerik:RadMenuItem> </Items> </telerik:RadContextMenu> <asp:Literal ID="ltrError" runat="server"/> <asp:Panel runat="server" id="ajaxPanel"> </asp:Panel>if (this.Page != null) { RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(this.Page); if (ajaxManager != null) { foreach (RadMenuItem item in ctxMenu.Items) { foreach (Control ctrl in item.Controls) { if (ctrl is LinkButton) { AjaxSetting ajaxSetting = new AjaxSetting(ajaxManager.ID); ajaxSetting.AjaxControlID = ctrl.ID.ToString(); ajaxSetting.UpdatedControls.Add(new AjaxUpdatedControl(ltrError.ID.ToString(), "ajaxLoad")); ajaxSetting.UpdatedControls.Add(new AjaxUpdatedControl(ajaxPanel.ID.ToString(), "ajaxLoad")); ajaxManager.AjaxSettings.Add(ajaxSetting); } } } } }<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="WebHabitSmasher.Test" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <div style="width:750px;"> <asp:Label ID="GoalType2Grid_error" runat="server" Width="750px" BackColor="Black" ForeColor="#CC0000" Font-Size="Larger"></asp:Label> </div> <telerik:RadGrid ID="GoalType2Grid" runat="server" AutoGenerateColumns="False" CellSpacing="0" Width="750px" OnInsertCommand="GoalType2Grid_InsertCommand" OnUpdateCommand="GoalType2Grid_EditCommand" OnDeleteCommand="GoalType2Grid_DeleteCommand" > <ClientSettings > <Selecting AllowRowSelect="true" /> </ClientSettings> <MasterTableView DataKeyNames="IdMilestones" CommandItemDisplay="Top"> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" /> <telerik:GridBoundColumn AllowSorting="False" DataField="Text" Groupable="False" MaxLength="255" ShowSortIcon="False" UniqueName="column" HeaderText = "Milestone"> <HeaderStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridCheckBoxColumn AllowFiltering="False" AllowSorting="False" DataField="UserDefinedPercent" DataType="System.Boolean" Groupable="False" ShowSortIcon="False" HeaderText = "User Entered %" UniqueName="column1"> </telerik:GridCheckBoxColumn> <telerik:GridNumericColumn AllowFiltering="False" AllowSorting="False" DataField="Percent" DataType="System.Int32" DecimalDigits="0" Groupable="False" HeaderText="% of Total Goal" ShowSortIcon="False" UniqueName="column2"> </telerik:GridNumericColumn> <telerik:GridDateTimeColumn AllowFiltering="False" AllowSorting="False" DataField="DateMilestoneEnd" DataType="System.DateTime" Groupable="False" HeaderText="Date to Complete" ShowSortIcon="False" UniqueName="column3"> </telerik:GridDateTimeColumn> <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" /> </telerik:GridButtonColumn> </Columns> </MasterTableView> </telerik:RadGrid> <br /> <br /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="GoalType2Grid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="GoalType2Grid" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> </asp:Content><telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <%--Needed for JavaScript IntelliSense in VS2010--%> <%--For VS2008 replace RadScriptManager with ScriptManager--%> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager>