or
OnRowSelecting event<script type="text/javascript"> function RowSelecting(sender, eventArgs) { //Prevent "disabled" grid RowSelecting from being selected (individually) var grid = sender; var MasterTable = grid.get_masterTableView(); var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()]; if (row.disabled) eventArgs.set_cancel(true) }</script> <radG:RadGrid ID="RadGrid1" AllowMultiRowSelection="true" runat="server"> <MasterTableView Width="100%"> <Columns> <radG:GridClientSelectColumn UniqueName="ClientSelectColumn" /> </Columns> </MasterTableView> <ClientSettings ApplyStylesOnClient="True"> <Selecting AllowRowSelect="True"></Selecting> <ClientEvents OnRowSelecting="RowSelecting" /> </ClientSettings> </radG:RadGrid>Is it possible to access the controls in the confirm template using C#?
For the code, how to refer to the “btnYes” on the page load function?
I would to access the control because my application will let users change the text on the control.
<telerik:RadWindowManager ID="PageAjaxWindowManager" runat="server" VisibleStatusbar ="false" OnClientShow="onClientShow" OnClientClose="onClientClose" OnClientBeforeClose="ConfirmClose" > <ConfirmTemplate> <div class="rwDialogPopup radconfirm"> <div class="rwDialogText"> {1} </div> <div> <a onclick="$find('{0}').close(true);" href="javascript:void(0);" ><asp:Button ID="btnYes" runat="server" Text="Yes,I do." /></a> <a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[No]##</span></span></a> </div> </div> </ConfirmTemplate> <Windows> <telerik:RadWindow ID="Window1" runat="server" Title="Window 1" Height="510px" Width="750px" Left="20px" Top="3px" Modal="true" /> <telerik:RadWindow ID=" Window2" runat="server" Title=" Window 2 " Height="480px" Width="750px" Left="20px" Top="3px" Modal="true" /> <telerik:RadWindow ID=" Window3" runat="server" Title=" Window 3" Height="400px" Width="550px" Left="50px" Modal="true" /> </Windows> </telerik:RadWindowManager>
| <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ctrlUserProfilePics.ascx.cs" |
| Inherits="OmegaLove.Web.UI.ctrlUserProfilePics" %> |
| <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
| <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> |
| <%@ Register Src="ctrlUserProfilePicsText.ascx" TagName="ctrlUserProfilePicsText" |
| TagPrefix="uc1" %> |
| <div class="accordionContent" style="display: block;"> |
| <div class="boxContent"> |
| <div style="padding-left: 15px; padding-right: 15px;"> |
| <uc1:ctrlUserProfilePicsText ID="ctrlUserProfilePicsText" runat="server" /> |
| <table cellspacing="2" cellpadding="0" width="800" border="0"> |
| <tbody> |
| <tr> |
| <td align="center" colspan="3"> |
| <%--<asp:Image ID="ImgFullSize" runat="server" Style="border: 4px solid white" ImageUrl="~/Images/NoPhoto.jpg" |
| CssClass="photo_198" />--%> |
| </td> |
| </tr> |
| <tr> |
| <td valign="middle" align="center" width="40"> |
| |
| </td> |
| <td align="center"> |
| <asp:UpdatePanel ID="UpdatePanel1" runat="server"> |
| <ContentTemplate> |
| <asp:DataList ID="DLThumbnails" runat="server" DataKeyField="img_id" RepeatDirection="Horizontal" |
| CellSpacing="5" CellPadding="0" HorizontalAlign="Center" CssClass="view" RepeatColumns="5" |
| Item-BorderWidth="1" Item-BorderColor="#c0c0c0" OnItemDataBound="DLThumbnails_ItemDataBound" |
| OnItemCommand="DLThumbnails_ItemCommand"> |
| <ItemTemplate> |
| <table cellspacing="7" cellpadding="0" border="0"> |
| <tr valign="top"> |
| <td> |
| <span class="verdana12"><b>Main profile photo</b></span> <span id="top_1"></span> |
| </td> |
| </tr> |
| <tr height="150" valign="top"> |
| <td> |
| <div style="position: relative; height: 148px;"> |
| <asp:Image runat="server" ID="view_image" Width="118" Height="148" alt='Photo from Album Number <%# Eval("img_id") %>' /> |
| </div> |
| <br /> |
| <asp:LinkButton ID="lnkRemove" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "img_id")%>' |
| Text="Delete Photo" OnClick="DeleteImage"></asp:LinkButton> |
| <%-- <asp:LinkButton ID="delete" runat="server" Text="Delete Photo" CommandName="Delete" |
| CommandArgument='<%#DataBinder.Eval(Container.DataItem, "img_id")%>'></asp:LinkButton>--%> |
| <%-- <asp:ImageButton ID="ImgButtonDeletePhoto" runat="server" ImageUrl="~/Images/Buttons/delete-image.gif" |
| Visible="true" OnClientClick="ImgButtonDeletePhoto_Click" />--%> |
| </td> |
| </tr> |
| </table> |
| </ItemTemplate> |
| <AlternatingItemStyle BackColor="White" /> |
| <ItemStyle Width="20%" BackColor="#EFF3FB" /> |
| <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> |
| <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> |
| <FooterTemplate> |
| </FooterTemplate> |
| </asp:DataList> |
| </ContentTemplate> |
| <Triggers> |
| <asp:AsyncPostBackTrigger ControlID="DLThumbnails" /> |
| </Triggers> |
| </asp:UpdatePanel> |
| <div id="AlertDiv" class="AlertStyle"> |
| </div> |
| <%-- <asp:Panel ID="Panel1" runat="server" Visible="false" CssClass="nullpanel"> |
| There are currently no pictures in your profile.</asp:Panel> |
| <br /> |
| <br />--%> |
| </td> |
| <td valign="middle" align="center" width="40"> |
| |
| </td> |
| </tr> |
| <tr> |
| <td> |
| |
| </td> |
| <td align="center"> |
| <%--<asp:Label ID="lblCurrentPage" runat="server" Font-Names="Trebuchet MS" Font-Size="12px" |
| ForeColor="White"></asp:Label>--%> |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| </tbody |
.aspx page:---------- <telerik:RadScheduler runat="server" ID="RadScheduler1" Height="500px" Skin="Web20" CustomAttributeNames="StartTime,EndTime,SessionDate,DisplayPermitName,EventStartDate,EventEndDate" ShowViewTabs="true" ShowHeader="true" ShowFooter="true" SelectedDate="2010-07-10" DataStartField="EventStartDate" DataEndField="EventEndDate" EnableDescriptionField="true" AppointmentStyleMode="Default" DayStartTime="08:00:00" DayEndTime="21:00:00" Visible="true" DataKeyField="ID" ReadOnly="false" FirstDayOfWeek="Monday" LastDayOfWeek="Friday" DataSubjectField="DisplayPermitName" ColumnWidth="100px" EnableEmbeddedSkins="false" AllowDelete="false" AllowEdit="false" AllowInsert="false" OnNavigationComplete="radScheduler1_NavigationComplete"> <AdvancedForm Modal="true" /> <AppointmentTemplate> <%-- <%--Permit Name--%> <asp:Label runat="server" Text='<%# Eval("DisplayPermitName")%>' ID="labelDisplayPermitName" Text="Permit Name :"> </asp:Label> <br /> <%--Start Time--%> <asp:Label runat="server" ID="labelStartTime" Text="Start Time :"> <%# Eval("StartTime")%> <br /> </asp:Label> <%--End Time--%> <asp:Label runat="server" ID="labelEndTime" Text="End Time : "> <%# Eval("EndTime")%> <br /> </asp:Label> <%--Session Date--%> <asp:Label runat="server" ID="labelSessionDate" Text="Session Date :"> <%# Eval("SessionDate")%> </asp:Label> <br /> </AppointmentTemplate> </telerik:RadScheduler>.cs Page-------- /// <summary> /// Populates the controls with data from the Business Objects. /// ClassReg20 User Interface will perform the concrete implementation of this method. /// </summary> protected override void FillControls() { try { this.AdminController.State.Session.Schedule = new Schedule(userSession); this.AdminController.State.Session.Schedules = this.AdminController.RetrieveAllEventSchedules(); this.RadScheduler1.DataSource = this.AdminController.State.Session.Schedules; DateTime dataStartTime = DateTime.Parse(this.AdminController.State.Session.Schedules[0].SessionDate.ToString()); //this.RadScheduler1.DataStartField = dataStartTime.ToString("u").Substring(0, 10); DateTime dataEndTime = DateTime.Parse(this.AdminController.State.Session.Schedules[this.AdminController.State.Session.Schedules.Count - 1].SessionDate.ToString()); //this.RadScheduler1.DataEndField = dataEndTime.ToString("u").Substring(0, 10); foreach (Schedule schedule in this.AdminController.State.Session.Schedules) { dataStartTime = DateTime.Parse(schedule.SessionDate.ToString()); dataEndTime = DateTime.Parse(schedule.SessionDate.ToString()); schedule.EventStartDate = dataStartTime.ToString("u").Substring(0, 10); schedule.EventEndDate = dataEndTime.ToString("u").Substring(0, 10); } this.RadScheduler1.DataBind(); }}
Thanks,
Janni Daniel.B