or
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <script type="text/javascript"> function open_win() { window.open("Pages/FullSMap.aspx?smapp=MainImage", "_blank", "toolbar=no, location=no, titlebar=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=100%, height=100%"); } </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server"> <asp:Panel ID="CnsrtsPanel" style="margin-left:10px; margin-right:10px;" runat="server"> <br /> <telerik:RadWindowManager VisibleOnPageLoad="false" ID="RadWindowManager2" runat="server"> <Windows> <telerik:RadWindow runat="server" VisibleTitlebar="true" DestroyOnClose="true" VisibleStatusbar="false" Behaviors="Close,Maximize,Minimize,Pin,Reload" Width="480px" Height="230px" style="z-index:80000;" ID="RadWindow1" NavigateUrl="Audio.aspx" > </telerik:RadWindow> </Windows> </telerik:RadWindowManager> <script type="text/javascript"> function UseRadWindow() { var oWnd = $find("<%= RadWindow1.ClientID %>"); oWnd.show(); oWnd.setUrl("Audio.aspx"); oWnd.maximize(); } </script> <asp:Label ID="HeaderLabel" SkinID="HeaderText" runat="server" Text="<%$ Resources:Resource, PagesConcertsHeaderLabel %>"></asp:Label> <br /> <telerik:RadGrid ID="ConcertsRadGrid" runat="server" Skin="WebBlue" AllowFilteringByColumn="false" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="ConcertsRadGrid_PreRender" OnNeedDataSource="ConcertsRadGrid_NeedDataSource" onitemcommand="ConcertsRadGrid_ItemCommand1" > <MasterTableView GridLines="None" Width="100%" Dir="RTL" CommandItemDisplay="None" DataKeyNames="CnsrtID"> <Columns> <telerik:GridBoundColumn UniqueName="CType" HeaderText="<%$ Resources:Resource, PagesConcertsRadGridCTypeColumn %>" DataField="CType"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="CnsrtName" HeaderText="<%$ Resources:Resource, PagesConcertsRadGridCnsrtNameColumn %>" DataField="CnsrtName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="Choirs" HeaderText="<%$ Resources:Resource, PagesConcertsRadGridChoirsColumn %>" DataField="Choirs"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="AudioColumn" HeaderText="Audio" > <ItemTemplate> <asp:LinkButton ID="AudioLinkButton" runat="server" OnClientClick="UseRadWindow();return false;" Text="Audio"></asp:LinkButton> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> </asp:Panel> </asp:Content> <ASPNetFlashVideo:FlashVideo ID="FlashVideo1" VideoURL="~/Common/Cnsrts/Clps/Kuwait1_5.flv" Width="302px" Height="210px" style="z-index:1;" AutoPlay="false" runat="server"> </ASPNetFlashVideo:FlashVideo> var radToolTip = $find(toolTipClientId); radToolTip.set_targetControlID(""); // Fix provided by Telerik b/c target control id is list in update panel radToolTip.set_targetControlID(sender.id); if (getMousePosition() > (getWindowHeight() / 2)) { radToolTip.set_position(Telerik.Web.UI.ToolTipPosition.TopRight); } else { radToolTip.set_position(Telerik.Web.UI.ToolTipPosition.BottomRight); } radToolTip.show();Here is the scenario
I have a RadGrid which contains a GridButtonColumn(I have highlighed in the code below). When the user clicks
then I take them to a separate page for editing. I know I can track this in the ItemCommand Event. But What I
am trying to accomplish is if possible get the cotrol id in the Page_Load so that I can skip all the other page
events and take redirect the user to the edit page.Currenly I am not able to do this since I can't get the
control id which cuased the postback (i this case it was the GridButtoncolumn) So my question is How to get
the Id/Control which caused the postback which is inside the RadGrid. Appreciate your reponse
Here is the code
<telerik:RadGrid ID="rdgAccountView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" OnNeedDataSource="rdgAccountView_OnNeedDataSource" OnItemCreated="rdgAccountView_ItemCreated" OnItemCommand="rdgAccountView_ItemCommand" OnPreRender="rdgAccountView_PreRender" OnLoad="rdgAccountView_OnLoad" OnItemDataBound="rdgAccountView_ItemDataBound" > <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="320"/> <Selecting AllowRowSelect="False" /> <Resizing AllowColumnResize="true" ClipCellContentOnResize="true" /> </ClientSettings> <ExportSettings> <Pdf FontType="Subset" PaperSize="Letter" /> <Excel Format="Html" /> </ExportSettings> <MasterTableView Width="100%" NoDetailRecordsText="No Account Records Found" CurrentResetPageIndexAction="SetPageIndexToFirst" Dir="LTR" Frame="Border" TableLayout="Auto" DataKeyNames="ParentIdentifier"> <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False"> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <Columns> <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="../../App_Themes/Default/DataEditingImages/Edit.gif" CommandName="EditAccountView" Text="Edit" UniqueName="EditFromAccountView"> <HeaderStyle Width="20px" /> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="FirstName" Groupable="False" HeaderText="First Name" UniqueName="Full Name" ReadOnly="True" ItemStyle-HorizontalAlign="left" HeaderStyle-Width="124px" HeaderStyle-Wrap="true" AutoPostBackOnFilter="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LastName" Groupable="False" HeaderText="Last Name" UniqueName="Full Name" ReadOnly="True" ItemStyle-HorizontalAlign="left" HeaderStyle-Width="124px" HeaderStyle-Wrap="true" AutoPostBackOnFilter="true"> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"> </EditColumn> <PopUpSettings ScrollBars="None"></PopUpSettings> </EditFormSettings> </MasterTableView> <ClientSettings AllowColumnsReorder="True"> </ClientSettings> </telerik:RadGrid>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="bq_test" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RSM1" runat="server" /> <telerik:RadSlider ID="RadSlider1" runat="server" ShowDecreaseHandle="false" ShowIncreaseHandle="false" ItemType="Item" Height="55" Enabled="false" Width="400" Skin="Default"> <Items> <telerik:RadSliderItem Value="1" Text="A" /> <telerik:RadSliderItem Value="1" Text="B" /> <telerik:RadSliderItem Value="1" Text="C" /> <telerik:RadSliderItem Value="1" Text="D" /> <telerik:RadSliderItem Value="1" Text="-" /> </Items> </telerik:RadSlider> </div> </form> </body> </html>