Good day,
I want to know if there is any way to post back to radWindow on maximize/minimize.
I am using RadChat in the radWindow and I need to resize it on maximize/minimize.
Thanks,
Regards
telerik:RadRotator ID="RadRotatorHorizontal" <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="News.Default" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server" > <title>Rotator Page</title> <style type="text/css"> .itemTemplate { width: 250px; height: 40px; } .rotatatorLeftRightBack, .rotatatorUpDownBack { float: left; background-repeat: no-repeat; padding-left: 30px; padding-top: 20px; width: 407px; height: 43px; } .floatRotator { float: left; margin-top: -5px; } .start, .stop, .left, .right, .up, .down, .startSelected, .stopSelected { width: 20px; height: 20px; display: block; cursor: hand; outline: none; } #navigationHorizontal .start, #navigationHorizontal .stop, .left, .right, #navigationHorizontal .startSelected, #navigationHorizontal .stopSelected { background-image: url('IMAGES/HorizontalButtons.gif'); } #navigationVertical .start, #navigationVertical .stop, .up, .down, #navigationVertical .stopSelected, #navigationVertical .startSelected { background-image: url('IMAGES/VerticalButtons.gif'); } .start span, .stop span, .left span, .right span, .down span, .up span, .stopSelected span, .startSelected span { width: 20px; height: 20px; display: block; text-indent: -500000px; } .stopSelected { background-position: 0px -25px; } .startSelected { background-position: -25px -25px; } .stop { background-position: 0px 0px; } .start { background-position: -25px 0px; } .left { background-position: -50px 0px; } .right { background-position: -75px 0px; } .down { background-position: -50px 0px; } .up { background-position: -75px 0px; } /* Hovers */.stop:hover { background-position: 0px -25px; } .start:hover { background-position: -25px -25px; } .stop:hover { background-position: 0px -25px; } .left:hover { background-position: -50px -25px; } .right:hover { background-position: -75px -25px; } .down:hover { background-position: -50px -25px; } .up:hover { background-position: -75px -25px; } .commandsWrapper, .commandsWrapper li { float: left; margin: 0; padding: 0; border: 0; list-style: none; height: auto; display: block; } .commandsWrapper { width: 136px; height: 20px; padding: 2px 0 0 10px; } .commandsWrapper li { margin-right: 14px; _margin-right: 13px; /* START IE6 hack */ } .commandsWrapper ul:after { content: ""; display: block; height: 0; overflow: hidden; line-height: 0; font-size: 0; clear: both; visibility: hidden; } .title { font-size: 20px; margin-bottom: 15px; } </style> </head><body class="BODY"> <form id="Form1" method="post" runat="server"> <telerik:RadScriptManager ID="ScriptManager1" runat="server"> </telerik:RadScriptManager> <script type="text/javascript"> //<![CDATA[ function GetRotator() { //return $find('<%#RadRotatorHorizontal.ClientID %>'); return document.getElementById(RadRotatorHorizontal); } //]]> </script> <script type="text/javascript"> //<![CDATA[ function startRotator(clickedButton, rotator, direction) { if (!rotator.autoIntervalID) { refreshButtonsState(clickedButton, rotator); rotator.autoIntervalID = window.setInterval(function () { rotator.showNext(direction); }, rotator.get_frameDuration()); } } function stopRotator(clickedButton, rotator) { if (rotator.autoIntervalID) { refreshButtonsState(clickedButton, rotator) window.clearInterval(rotator.autoIntervalID); rotator.autoIntervalID = null; } } function showNextItem(clickedButton, rotator, direction) { rotator.showNext(direction); refreshButtonsState(clickedButton, rotator); } // Refreshes the Stop and Start buttons function refreshButtonsState(clickedButton, rotator) { var jQueryObject = $telerik.$; var className = jQueryObject(clickedButton).attr("class"); switch (className) { case "start": {// Start button is clicked jQueryObject(clickedButton).removeClass(); jQueryObject(clickedButton).addClass("startSelected"); // Find the stop button. stopButton is a jQuery object var stopButton = findSiblingButtonByClassName(clickedButton, "stopSelected"); if (stopButton) {// Changes the image of the stop button stopButton.removeClass(); stopButton.addClass("stop"); } } break; case "stop": {// Stop button is clicked jQueryObject(clickedButton).removeClass(); jQueryObject(clickedButton).addClass("stopSelected"); // Find the start button. startButton is a jQuery object var startButton = findSiblingButtonByClassName(clickedButton, "startSelected"); if (startButton) {// Changes the image of the start button startButton.removeClass(); startButton.addClass("start"); } } break; } } // Finds a button by its className. Returns a jQuery object function findSiblingButtonByClassName(buttonInstance, className) { var jQuery = $telerik.$; var ulElement = jQuery(buttonInstance).parent().parent(); // get the UL element var allLiElements = jQuery("li", ulElement); // jQuery selector to find all LI elements for (var i = 0; i < allLiElements.length; i++) { var currentLi = allLiElements[i]; var currentAnchor = jQuery("A:first", currentLi); // Find the Anchor tag if (currentAnchor.hasClass(className)) { return currentAnchor; } } } //]]> </script> <table> <tr> <td class="style1"> <div class="rotatatorLeftRightBack"> <telerik:RadRotator ID="RadRotatorHorizontal" runat="server" ScrollDuration="50" RegisterWithScriptManager="true" Height="250px" Width="490px" RotatorType="FromCode" ScrollDirection="Left" CssClass="floatRotator"> <ItemTemplate> <div class="itemTemplate"> <%# XPath("Title") %> </div> </ItemTemplate> </telerik:RadRotator> <button onclick="$find('<%#RadRotatorHorizontal.ClientID%>').showNext(Telerik.Web.UI.RotatorScrollDirection.Left);" type="button" class="left"> </button> <button onclick="$find('<%#RadRotatorHorizontal.ClientID%>').showNext(Telerik.Web.UI.RotatorScrollDirection.Right);" type="button" class="right"> </button> <a onclick='javascript:alert(getRotator());'>Testing</a> <a onclick='javascript:alert($find("RadRotatorHorizontal_ClientState"));'>jstest</a>; <ul id="navigationHorizontal" class="commandsWrapper"> <li><a href="#" onclick="stopRotator(this, $find('<%#RadRotatorHorizontal.ClientID%>')); return false;" class="stopSelected" title="Stop"><span>Stop</span></a></li> <li><a href="#" onclick="startRotator(this, $find('<%#RadRotatorHorizontal.ClientID%>'), Telerik.Web.UI.RotatorScrollDirection.Left); return false;" class="start" title="Start"><span>Start</span></a></li> <li><a href="#" onclick="showNextItem(this, $find('<%#RadRotatorHorizontal.ClientID%>'), Telerik.Web.UI.RotatorScrollDirection.Left); return false;" class="left" title="Left"><span>Up</span></a></li> <li><a href="#" onclick="showNextItem(this, $find('<%#RadRotatorHorizontal.ClientID%>'), Telerik.Web.UI.RotatorScrollDirection.Right); return false;" class="right" title="Right"><span>Down</span></a></li> </ul> </div> </td> </tr> </table> </form> </body></html>
protected void RgSolic_SelectedIndexChanged(object sender, EventArgs e) { foreach (GridDataItem selectedItem in rgSolic.SelectedItems) { strNom = selectedItem["NombreCompleto"].Text; strPuesto = selectedItem["nom_pue"].Text; strCveAdscripcion = selectedItem["cve_adscripcion"].Text; strArea = selectedItem["nom_area"].Text; } } protected void btnRegistra_Click(object sender, EventArgs e) { //BD_SSEGUAEntities sseguaRegistro = new BD_SSEGUAEntities(); //sseguaRegistro.spRegistraSolicitud1(); //Valida Datos del Menor using (var dbContext = new BD_SSEGUAEntities()) { var ResultSet = new Menor(); var ResultSol = new Solicitud(); var ResulBitacora = new Bitacora(); if (chkMasc.Checked) { sexo = "M"; } if (chkFem.Checked) { sexo = "F"; } if (rdTxtAPatMen.Text != "" && rdTxtAMatMen.Text != "" && rdTxtNomMen.Text != "" && RadDatePicker1.SelectedDate != null && sexo != "" && rdCmbEdificio.SelectedValue != "" && rdTxtDomicilio.Text != "" && rdTxtHEnt.Text != "" && rdTxtHSal.Text != "" && rdTxtTelOfic.Text != "" && rdTxtExt.Text != "" && rdTxtPart.Text != "" && rdTxtCorreoE.Text != "" && rdTxtDomPart.Text != "" && rdTxtNHijos.Text != "" && rdCmbTEmbzo.SelectedValue != "0") { try { System.DateTime.Now.Year.ToString(); //ResultSol.fcCvePuesto = rgSolic.Columns.FindByUniqueName("nom_pue").ToString(); //ResultSol.fcCveAdsc = rgSolic.Columns.FindByDataField("cve_adscripcion").ToString(); ResultSol.fcNomEmpleado = strNom;
ResultSol.fcCveAdsc = strCveAdscripcion;
ResultSol.fcCvePuesto = strPuesto; ResultSol.fcDomLabora = rdTxtDomicilio.Text; ResultSol.fiHorEntLab = (Byte)rdTxtHEnt.Value; ResultSol.fiHorSalLab = (Byte)rdTxtHSal.Value; ResultSol.fiTelOfna = rdTxtTelOfic.Text; ResultSol.fiExtTel = rdTxtExt.Text; ResultSol.fiTelPart = rdTxtPart.Text; ResultSol.fcCorreoE = rdTxtCorreoE.Text; ResultSol.fcDomPart = rdTxtDomPart.Text; ResultSol.fiNumHijos = (Byte)rdTxtNHijos.Value; foreach (var menor in listaMenores) { ResultSol.Menor.Add(menor); } dbContext.AddToSolicitud(ResultSol); dbContext.SaveChanges(); //ResultSet.fcPatMenor = rdTxtAPatMen.Text; //ResultSet.fcMatMenor = rdTxtAMatMen.Text; //ResultSet.fcNomMenor = rdTxtNomMen.Text; //ResultSet.fdFchNacMenor = (DateTime)RadDatePicker1.SelectedDate; //ResultSet.fiAnosMenor = (Byte)rdTxtAnio.Value; //ResultSet.fiMesesMenor = (Byte)rdTxtMeses.Value; //ResultSet.fiSexoMenor = sexo; //ResultSet.fdFchRegMenor = DateTime.Today; //dbContext.Menores.AddObject(ResultSet); //dbContext.SaveChanges(); //RgMenor.DataSource = ResultSet; //RgMenor.Rebind(); } catch (Exception ex) { Alerta(ex.Message); } } else { Alerta("Captura todos lo datos del Menor"); } } } <div class="class_1" style="width:512px"> <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None"><MasterTableView AutoGenerateColumns="False" DataKeyNames="DokId" DataSourceID="SqlDataSource1"><CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings><RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn> <Columns> <telerik:GridTemplateColumn DataField="DokuType" FilterControlAltText="Filter column column" HeaderText="Materials" UniqueName="DokuType"> <EditItemTemplate> <telerik:RadComboBox runat="server"> </telerik:RadComboBox> </EditItemTemplate> <ItemTemplate> <telerik:RadComboBox ID="RadComboBox1" Runat="server"> <Items> <telerik:RadComboBoxItem runat="server" Text="Documentation" Value="Tagungsunterlagen" /> <telerik:RadComboBoxItem runat="server" Text="Books" Value="Bücher" /> <telerik:RadComboBoxItem runat="server" Text="Other" Value="Sonstiges" /> </Items> </telerik:RadComboBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="VAday" FilterControlAltText="Filter column1 column" HeaderText="Days" UniqueName="VAday"> <EditItemTemplate> <telerik:RadComboBox runat="server"> </telerik:RadComboBox> </EditItemTemplate> <ItemTemplate> <telerik:RadComboBox ID="RadComboBox2" Runat="server" DataSourceID="SqlDataSource3" SelectedValue='<%# Bind("VAday") %>'> </telerik:RadComboBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn FilterControlAltText="Filter Delegates column" HeaderText="Delegates" UniqueName="Delegates"> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Menge" DataType="System.Int16" FilterControlAltText="Filter Menge column" HeaderText="Additional Amount" UniqueName="Menge"> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Price" FilterControlAltText="Filter DokuType column" HeaderText="Unit Price" UniqueName="Price"> <EditItemTemplate> <asp:TextBox ID="DokuTypeTextBox" runat="server" Text='<%# Bind("DokuType") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="DokuTypeLabel" runat="server" Text='<%# Eval("DokuType") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> </Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings></MasterTableView><FilterMenu EnableImageSprites="False"></FilterMenu><HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:webzeus %>" SelectCommand="SELECT * FROM [Dokus] WHERE ([Number] = @Number)"> <SelectParameters> <asp:SessionParameter Name="Number" SessionField="curNumber" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:webzeus %>" SelectCommand="pr_TNproTag" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:SessionParameter DefaultValue="12814" Name="curNumber" SessionField="curNumber" Type="Int32" /> <asp:Parameter DefaultValue="Dokus" Name="curPar" Type="String" /> </SelectParameters> </asp:SqlDataSource> </div></div>
<telerik:RadWindow ID="RadWindow1" VisibleOnPageLoad="false" Title="Visa tid" IconUrl="~/App_Themes/Classic/Images/MenuItems/book.png"
runat="server" Modal="false" Top="0px" Left="0px" VisibleStatusbar="false" VisibleTitlebar="true"
AutoSize="false" Width="640px" Height="340px" ShowContentDuringLoad="false" OnClientBeforeClose="window_beforeClose"
Behavior="Close" Style="z-index: 10000">
</telerik:RadWindow>
var currentBookingId = 0;
function openSlot(slotId, bookingId) {
if (cancelPopup) { cancelPopup = false;return; }
if (currentBookingId > 0) $("#b" + currentBookingId).removeClass("selected");
currentBookingId = bookingId;
$(
"#b" + currentBookingId).addClass("selected");
var url = "EditSlot.aspx?standalone=true&Id=" + slotId;
var oWnd = $find("<%=RadWindow1.ClientID%>");
oWnd.set_title(
"Laddar...");
oWnd.setUrl(url);
oWnd.show();
}
Mvh
/Emil Eriksson
<telerik:GridBoundColumn HeaderText="Zip Code" UniqueName="ZipCode" DataField="ZipCode" ItemStyle-Wrap="true" AllowSorting="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="9%" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="9%" DataFormatString="{0:#####-####}"> </telerik:GridBoundColumn><
telerik:RadScheduler ID="rsDaySchedule" Height="2093px" BorderStyle="None" ShowNavigationPane="false" Width ="100%" ShowViewTabs="false" AllowDelete="False" AllowEdit="true" AllowInsert="False" HoursPanelTimeFormat="h:mmtt" NumberOfHoveredRows="1" RowHeight ="52px" DayStartTime="8:30:00" DayEndTime="13:00:00" SelectedView="DayView" OnAppointmentDataBound="rsDaySchedule_AppointmentDataBound" OnAppointmentCommand="rsDaySchedule_AppointmentCommand" OnAppointmentClick="rsDaySchedule_AppointmentClick" MinutesPerRow="15" DataSubjectField="OrgName" DataKeyField="ScheduleEntryID" DataStartField="startTime" DataEndField="endTime" CustomAttributeNames="Desicions,DayLeft,ScheduleEntryID,OrgID" EnableCustomAttributeEditing="true" runat="server" style="left: 0px; top:0px" Skin
<AppointmentTemplate >
<asp:Table ID="Table1" CssClass="OrgInfo" BorderStyle="NotSet" runat="server" Width ="100%" Height="52px" >
<asp:TableRow Height="30px">
<asp:TableCell Width ="109px">
<asp:Label ID="lblOrgName" runat ="server" Text="Organization Name: "></asp:Label>
</asp:TableCell>
<asp:TableCell Width ="339px">
<asp:Label ID="txtOrgName" runat ="server" Font-Bold="true" Text='<%# Eval("Subject") %>'></asp:Label>
</asp:TableCell>
<asp:TableCell Width ="228px">
<asp:Label ID="lblDecision" runat ="server" Text="Decision: "></asp:Label>
<asp:Label ID="txtDecision" runat ="server" Font-Bold="true" Text='<%# Eval("Desicions") %>'></asp:Label>
</asp:TableCell>
<asp:TableCell Width="82px">
<asp:Label ID="lblDayLeft" runat ="server" Text="Days Left: "></asp:Label>
<asp:Label ID="txtDayLeft" runat ="server" Font-Bold="true" Text='<%# Eval("DayLeft") %>'></asp:Label>
<asp:HiddenField ID="hdScheduleEntryID" Value ='<%# Eval("ScheduleEntryID") %>' runat="server" />
<asp:HiddenField ID="hdOrgID" Value ='<%# Eval("OrgID") %>' runat="server"/>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow Height="21px">
<asp:TableCell >
</asp:TableCell>
<asp:TableCell>
</asp:TableCell>
<asp:TableCell >
<sp:LinkButton ID="lbtnResche" runat="server" ForeColor="Blue" CommandName="Reschedule" Text="Reschedule"></asp:LinkButton>
<asp:LinkButton ID="lbtnRatings" runat="server" ForeColor="Blue" CommandName="EditRating" Enabled="True" Text="Edit Ratings"></asp:LinkButton> <asp:LinkButton ID="lbtnNext" runat="server" ForeColor="Blue" CommandName="More" Text="More info ..." > </asp:LinkButton>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</AppointmentTemplate>
</telerik:RadScheduler>
My requestion is "How to find the controls in my AppointmentTemplate from AppointmentDataBound?"
How come in my
Protected Su
b rsDaySchedule_AppointmentDataBound(ByVal sender As Object, ByVal e As
Dim lbtnRatings As LinkButton = CType(e.Appointment.AppointmentControls(0).FindControl("lbtnRatings"), LinkButton)
I get error message -- Index was out of range.e.Appointment.AppointmentControls.count =0 always !
Please help ! Thanks a lot!
<telerik:RadScheduler ID="rsDaySchedule" Height="2093px" BorderStyle="None" ShowNavigationPane="false" Width ="100%" ShowViewTabs="false" AllowDelete="False" AllowEdit="true" AllowInsert="False" HoursPanelTimeFormat="h:mmtt" NumberOfHoveredRows="1" RowHeight ="52px" DayStartTime="8:30:00" DayEndTime="13:00:00" SelectedView="DayView" OnAppointmentDataBound="rsDaySchedule_AppointmentDataBound" OnAppointmentCommand="rsDaySchedule_AppointmentCommand" OnAppointmentClick="rsDaySchedule_AppointmentClick" MinutesPerRow="15" DataSubjectField="OrgName" DataKeyField="ScheduleEntryID" DataStartField="startTime" DataEndField="endTime" CustomAttributeNames="Desicions,DayLeft,ScheduleEntryID,OrgID" EnableCustomAttributeEditing="true" runat="server" style="left: 0px; top:0px" Skin="Sunset"> <AppointmentTemplate > <asp:Table ID="Table1" CssClass="OrgInfo" BorderStyle="NotSet" runat="server" Width ="100%" Height="52px" > <asp:TableRow Height="30px"> <asp:TableCell Width ="109px"> <asp:Label ID="lblOrgName" runat ="server" Text="Organization Name: "></asp:Label> </asp:TableCell> <asp:TableCell Width ="339px"> <asp:Label ID="txtOrgName" runat ="server" Font-Bold="true" Text='<%# Eval("Subject") %>'></asp:Label> </asp:TableCell> <asp:TableCell Width ="228px"> <asp:Label ID="lblDecision" runat ="server" Text="Decision: "></asp:Label> <asp:Label ID="txtDecision" runat ="server" Font-Bold="true" Text='<%# Eval("Desicions") %>'></asp:Label> </asp:TableCell> <asp:TableCell Width ="82px"> <asp:Label ID="lblDayLeft" runat ="server" Text="Days Left: "></asp:Label> <asp:Label ID="txtDayLeft" runat ="server" Font-Bold="true" Text='<%# Eval("DayLeft") %>'></asp:Label> <asp:HiddenField ID="hdScheduleEntryID" Value ='<%# Eval("ScheduleEntryID") %>' runat="server" /> <asp:HiddenField ID="hdOrgID" Value ='<%# Eval("OrgID") %>' runat="server" /> </asp:TableCell> </asp:TableRow> <asp:TableRow Height="21px"> <asp:TableCell > </asp:TableCell> <asp:TableCell > </asp:TableCell> <asp:TableCell > <asp:LinkButton ID="lbtnResche" runat="server" ForeColor="Blue" CommandName="Reschedule" Text="Reschedule"></asp:LinkButton> <asp:LinkButton ID="lbtnRatings" runat="server" ForeColor="Blue" CommandName="EditRating" Enabled="True" Text="Edit Ratings"></asp:LinkButton> <asp:LinkButton ID="lbtnNext" runat="server" ForeColor="Blue" CommandName="More" Text="More info ..." > </asp:LinkButton> </asp:TableCell> </asp:TableRow> </asp:Table> </AppointmentTemplate> </telerik:RadScheduler>
My question: How to find my control lbtnRatings form
Protected Sub rsDaySchedule_AppointmentDataBound(ByVal sender As Object, ByVal e As SchedulerEventArgs)
Thank you very much for your help in advance!
Susan