or
| var numberOfCustomFields = 0; |
| function OnClientAddedHandler(sender, eventArgs) |
| { |
| var inputRow = eventArgs.get_row(); |
| var uList = inputRow.parentNode; |
| var count = 0; |
| //new row for a User Manual Category check box |
| newRow = document.createElement("li"); |
| count++; |
| uList.insertBefore(newRow, inputRow); |
| var label = document.createElement("span"); |
| label.innerHTML = "Manuals/Add. info"; |
| label.style.fontSize = 12; |
| input = document.createElement("input"); |
| input.type = "radio"; |
| input.name = "group" + count; |
| input.id = sender.getID("radUserManual"); |
| newRow.appendChild(input); |
| newRow.appendChild(label); |
| //new row for a Cut-Sheets Category check box |
| newRow = document.createElement("li"); |
| count++; |
| uList.insertBefore(newRow, inputRow); |
| var label = document.createElement("span"); |
| label.innerHTML = "FFE Cut Sheet"; |
| label.style.fontSize = 12; |
| input = document.createElement("input"); |
| input.type = "radio"; |
| input.name = "group"+ count; |
| input.id = sender.getID("radCutSheet"); |
| newRow.appendChild(input); |
| newRow.appendChild(label); |
| // Set the number of fields from the count |
| numberOfCustomFields = count; |
| } |
| function OnClientDeletingHandler(sender, eventArgs) |
| { |
| var input = eventArgs.get_fileInputField(); |
| deleteCustomFields(input); |
| } |
| function OnClientDeletingSelectedHandler(sender, eventArgs) |
| { |
| var inputs = eventArgs.get_fileInputFields(); |
| for (i = 0; i < inputs.length; i++) |
| { |
| deleteCustomFields(inputs[i]); |
| } |
| eventArgs.set_cancel(true); |
| } |
| function deleteCustomFields(input) |
| { |
| var li = input.parentNode.parentNode; |
| var ul = input.parentNode.parentNode.parentNode; |
| for (var i = 0; i < numberOfCustomFields; i++) |
| { |
| ul.removeChild(li.previousSibling); |
| } |
| ul.removeChild(li); |
| } |
| For Each f As Telerik.Web.UI.UploadedFile In RadUpload1.UploadedFiles |
| If f.GetIsFieldChecked("radCutSheet") Then |
| sCategory = "Cutsheet" |
| ElseIf f.GetIsFieldChecked("radUserManual") Then |
| sCategory = "User Manual" |
| End If |
| If Directory.Exists(strPath & Replace(txtStockNumber.Text.Trim, "-", "") & "/") Then |
| f.SaveAs(strPath & Replace(txtStockNumber.Text.Trim, "-", "") & "/" & f.GetName, True) |
| Else |
| Directory.CreateDirectory(strPath & Replace(txtStockNumber.Text.Trim, "-", "") & "/") |
| f.SaveAs(strPath & Replace(txtStockNumber.Text.Trim, "-", "") & "/" & f.GetName, True) |
| End If |
| 'Insert record into the database - because this file may exists we need to create a stored proc |
| 'that will do an insert or an update. |
| 'StoreNameinDB(strPath & Replace(txtStockNumber.Text.Trim, "-", "") & "/" & f.GetName, sCategory) |
| Next |
| <telerik:GridNumericColumn UniqueName="Reduction" SortExpression="Reduction" HeaderText="Reduction" DataField="Reduction" FooterText="NumericColumn footer" NumericType="Number" AllowRounding="false" DataType="System.Decimal" KeepNotRoundedValue="true" DataFormatString="{0:F10}" > |
| </telerik:GridNumericColumn> |
| <script type="text/javascript"> |
| function docFileGridOnRowCreated(sender, eventArgs) { } |
| function docFileGridOnRowCreating(sender, eventArgs) { } |
| function docFileGridOnRowDblClick(sender, eventArgs) |
| { |
| alert(eventArgs.get_gridDataItem().get_dataItem()); |
| } |
| </script> |
| <style type="text/css"> |
| </style> |
| <asp:Button ID="btn" runat="server" Text="Save" /> |
| <cym:RadGrid ID="docFileGrid" runat="server" DataSourceID="docFileODS" |
| ClientSettings-ClientEvents-OnRowDblClick=""> |
| <ClientSettings> |
| <ClientEvents OnRowCreated="docFileGridOnRowCreated" |
| OnRowCreating="docFileGridOnRowCreating" OnRowDblClick="docFileGridOnRowDblClick" /> |
| </ClientSettings> |
| <MasterTableView DataKeyNames="AccountFileID, AccountID, FileID, GUID"> |
| <Columns> |
| <rad:GridBoundColumn DataField="FileName" HeaderText="Name" /> |
| </MasterTableView> |
| </cym:RadGrid> |
So I found this example on how create a dropdown and bind it to the grid.
| <!--GridDropDownColumn example--> |
| <telerik:GridDropDownColumn DataSourceID="SqlDataSource3" ListTextField="City" ListValueField="City" |
| UniqueName="City" HeaderText="RadComboBox Column" DataField="City" |
| DropDownControlType="RadComboBox"> |
| </telerik:GridDropDownColumn> |
| <!--New SqlDataSource for DropDownColumn --> |
| <asp:SqlDataSource runat="server" ID="SqlDataSource3" ConnectionString="<%$ |
| ConnectionStrings:NorthwindConnectionString %>" |
| SelectCommand="SELECT DISTINCT [City] FROM [Employees]"> |
| </asp:SqlDataSource> |
I would expect them to behave the same...
On the initial get I get:
| <%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %> |
| <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
| <!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> |
| <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> |
| <link href="cssStyle.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <form id="form1" runat="server" method="post"> |
| <h1>Medical Schedule</h1> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| <Scripts> |
| <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" /> |
| </Scripts> |
| </telerik:RadScriptManager> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadScheduler1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> |
| <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Default" /> |
| <script type="text/javascript"> |
| /* <![CDATA[ */ |
| /* Helper functions */ |
| /// <summary> |
| /// Returns the appointments in the specified period filtered by the specified resource. |
| /// </summary> |
| /// <param name="scheduler"> |
| /// RadScheduler's client-side object |
| /// </param> |
| /// <param name="start" type="Date"> |
| /// The start of the period |
| /// </param> |
| /// <param name="end" type="Date"> |
| /// The end of the period |
| /// </param> |
| /// <param name="resource"> |
| /// The resource (room or user) to filter by |
| /// </param> |
| /// <param name="appointment"> |
| /// The current appointment |
| /// </param> |
| function getAppointmentsInRangeByResource(scheduler, start, end, resource, appointment) |
| { |
| //Get all appointments within the specified time period |
| var result = scheduler.get_appointments().getAppointmentsInRange(start, end); |
| //If specified remove the appointment from the appointment list |
| if (appointment) |
| result.remove(appointment); |
| //Filter the appointments based on the resource |
| return result.findByResource(resource); |
| } |
| /// <summary> |
| /// Checks if the user associated with the specified appointment has another |
| /// appointment in the specified time period |
| /// </sumary> |
| /// <param name="scheduler"> |
| /// RadScheduler's client-side object |
| /// </param> |
| /// <param name="start" type="Date"> |
| /// The start of the period |
| /// </param> |
| /// <param name="end" type="Date"> |
| /// The end of the period |
| /// </param> |
| /// <param name="appointment"> |
| /// The current appointment |
| /// </param> |
| function isFacilitatorOccupied(scheduler, start, end, appointment) |
| { |
| //get the "User" resource associated with the appointment |
| var currentFacilitator = appointment.get_resources().getResourcesByType("Facilitator").getResource(0); |
| //get all appointments in this period which are associated with this resource |
| var appointmentsForThisFacilitator = getAppointmentsInRangeByResource(scheduler, start, end, currentFacilitator, appointment); |
| //if the list of appointments is not empty the user has other appointments besides the specified in this time period |
| return appointmentsForThisFacilitator.get_count() > 0; |
| } |
| function warnIfOccupied(start, end, sender, args) |
| { |
| var slot = args.get_targetSlot(); |
| var appointment = args.get_appointment(); |
| if (isFacilitatorOccupied(sender, start, end, appointment)) |
| { |
| alert("This Facilitator is occupied in this time period."); |
| args.set_cancel(true); |
| } |
| appointment.get_element().style.border = ""; |
| } |
| /// <summary> |
| /// Checks if the specified time slot is occupied and visually shows it to the user. |
| /// Called by the resizeing and moving client-side event handlers. |
| /// </sumary> |
| function highlightIfOccupied(start, end, sender, args) |
| { |
| alert("4"); |
| var appointment = args.get_appointment(); |
| var slot = args.get_targetSlot(); |
| if (isFacilitatorOccupied(sender, start, end, appointment)) |
| { |
| appointment.get_element().style.border = "1px solid red"; |
| return; |
| } |
| appointment.get_element().style.border = ""; |
| } |
| function onAppointmentResizing(sender, args) |
| { |
| var start = args.get_appointment().get_start(); |
| var end = args.get_targetSlot().get_endTime(); |
| highlightIfOccupied(start, end, sender, args); |
| } |
| function onAppointmentResizeEnd(sender, args) |
| { |
| var start = args.get_appointment().get_start(); |
| var end = args.get_targetSlot().get_endTime(); |
| warnIfOccupied(start, end, sender, args); |
| } |
| function onAppointmentMoving(sender, args) |
| { |
| var start = args.get_targetSlot().get_startTime(); |
| var end = new Date(start.getTime() + args.get_appointment().get_duration()); |
| highlightIfOccupied(start, end, sender, args); |
| } |
| function onAppointmentMoveEnd(sender, args) |
| { |
| var start = args.get_targetSlot().get_startTime(); |
| var end = new Date(start.getTime() + args.get_appointment().get_duration()); |
| warnIfOccupied(start, end, sender, args); |
| } |
| function onAppointmentInserting(sender, args) |
| { |
| var slot = args.get_targetSlot(); |
| var start = slot.get_startTime(); |
| var end = slot.get_endTime(); |
| if (isFacilitatorOccupied(sender, start, end, slot)) |
| { |
| alert("This Facilitator is not available in this time period."); |
| args.set_cancel(true); |
| } |
| } |
| /* ]]> */ |
| </script> |
| <div> |
| <table cellspacing="0" cellpadding="5" class="Refinement"> |
| <tr valign="top"> |
| <td><h3>State:</h3></td> |
| <td><h3>Group By:</h3></td> |
| <td><h3>Direction:</h3></td> |
| <td><asp:Label ID="lblStates" runat="server" Text="Test Label" Visible="false" /></td> |
| </tr> |
| <tr valign="top"> |
| <td> |
| <asp:CheckBoxList runat="server" id="chkState" RepeatLayout="Table" RepeatDirection="Horizontal" RepeatColumns="5" Width="400px"> |
| <asp:ListItem Text="ACT" Value="ACT" /> |
| <asp:ListItem Text="NSW" Value="NSW" /> |
| <asp:ListItem Text="NT" Value="NT" /> |
| <asp:ListItem Text="NZ" Value="NZ" /> |
| <asp:ListItem Text="QLD" Value="QLD" /> |
| <asp:ListItem Text="SA" Value="SA" /> |
| <asp:ListItem Text="TAS" Value="TAS" /> |
| <asp:ListItem Text="VIC" Value="VIC" /> |
| <asp:ListItem Text="WA" Value="WA" /> |
| </asp:CheckBoxList> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="ddlGroupBy" Runat="server" > |
| <Items> |
| <telerik:RadComboBoxItem runat="server" Selected="True" Text="None" /> |
| <telerik:RadComboBoxItem runat="server" Text="Activity" Value="Activity" /> |
| <telerik:RadComboBoxItem runat="server" Text="Facilitator" Value="Facilitator" /> |
| <telerik:RadComboBoxItem runat="server" Text="Client" Value="Client" /> |
| <telerik:RadComboBoxItem runat="server" Text="State" Value="State" /> |
| </Items> |
| </telerik:RadComboBox> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="ddlGroupingDirection" Runat="server"> |
| <Items> |
| <telerik:RadComboBoxItem runat="server" Text="Vertical" Value="Vertical" Selected="True" /> |
| <telerik:RadComboBoxItem runat="server" Text="Horizontal" Value="Horizontal" /> |
| </Items> |
| </telerik:RadComboBox> |
| </td> |
| <td><asp:ImageButton runat="server" ID="btnSubmit_Refinement" ImageUrl="images/buttons/btnSubmit_Refinement.jpg" /></td> |
| </tr> |
| </table> |
| <br /> |
| <br /> |
| <telerik:RadScheduler ID="RadScheduler1" runat="server" |
| DataKeyField="ID" DataSourceID="dsSchedule" DataStartField="Start" DataEndField="End" DataSubjectField="Subject" |
| DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID" |
| HoursPanelTimeFormat="htt" MinutesPerRow="15" |
| ValidationGroup="RadScheduler1" Height="700px" Skin="WebBlue" |
| Culture="English (Australia)" WorkDayEndTime="18:00:00" |
| FirstDayOfWeek="Monday" RowHeaderWidth="100px" |
| StartInsertingInAdvancedForm="True" |
| OnAppointmentCreated="RadScheduler1_AppointmentCreated" |
| OnClientAppointmentInserting="onAppointmentInserting" |
| OnClientAppointmentMoving="onAppointmentMoving" OnClientAppointmentMoveEnd="onAppointmentMoveEnd" |
| OnClientAppointmentResizing="onAppointmentResizing" OnClientAppointmentResizeEnd="onAppointmentResizeEnd"> |
| <ResourceTypes> |
| <telerik:ResourceType DataSourceID="dsActivity" ForeignKeyField="Activity_ID" KeyField="Activity_ID" Name="Activity" TextField="Activity_Name" /> |
| <telerik:ResourceType DataSourceID="dsFacilitator" ForeignKeyField="Facilitator_ID" KeyField="Facilitator_ID" Name="Facilitator" TextField="FirstName" /> |
| <telerik:ResourceType DataSourceID="dsClient" ForeignKeyField="Client_ID" KeyField="Client_ID" Name="Client" TextField="Client_Name" /> |
| <telerik:ResourceType DataSourceID="dsState" ForeignKeyField="State" KeyField="State" Name="State" TextField="State" /> |
| </ResourceTypes> |
| <Localization AdvancedAllDayEvent="All day"></Localization> |
| <AdvancedForm DateFormat="d/MM/yyyy" TimeFormat="h:mm tt"></AdvancedForm> |
| <TimelineView UserSelectable="false" /> |
| <MultiDayView UserSelectable="false" /> |
| <AppointmentTemplate> |
| <%# Eval("Client.Text") %> - <%# Eval("Activity.Text") %> - <%# Eval("Facilitator.Text") %> |
| </AppointmentTemplate> |
| <InlineInsertTemplate> |
| <asp:TextBox runat="server" ID="SubjectTextBox" Text='<%# Bind("Subject") %>' Width="99%"></asp:TextBox> |
| <div class="UserToolbox"> |
| User: |
| <telerik:RadComboBox runat="server" ID="FacilitatorComboBox" DataTextField="Facilitator_Display" DataValueField="Facilitator_ID" |
| Width="80px" Skin="Office2007" SelectedValue='<%# Bind("Facilitator_ID") %>' DataSource='<%# GetAvailableFacilitators(Container) %>'> |
| </telerik:RadComboBox> |
| <asp:LinkButton runat="server" ID="InsertLinkButton" CommandName="Insert" Text="Insert"></asp:LinkButton> |
| <asp:LinkButton runat="server" ID="CancelLinkButton" CommandName="Cancel" Text="Cancel"></asp:LinkButton> |
| </div> |
| </InlineInsertTemplate> |
| <InlineEditTemplate> |
| <asp:TextBox runat="server" ID="SubjectTextBox" Text='<%# Bind("Subject") %>' Width="99%"></asp:TextBox> |
| <div class="UserToolbox"> |
| User: |
| <telerik:RadComboBox runat="server" ID="FacilitatorComboBox" DataTextField="Facilitator_Display" DataValueField="Facilitator_ID" |
| Width="80px" Skin="Office2007" SelectedValue='<%# Bind("Facilitator_ID") %>' DataSource='<%# GetAvailableFacilitators(Container) %>' > |
| </telerik:RadComboBox> |
| <asp:LinkButton runat="server" ID="UpdateLinkButton" CommandName="Update" Text="Update"></asp:LinkButton> |
| <asp:LinkButton runat="server" ID="CancelLinkButton" CommandName="Cancel" Text="Cancel"></asp:LinkButton> |
| </div> |
| </InlineEditTemplate> |
| </telerik:RadScheduler> |
| <asp:SqlDataSource ID="dsSchedule" runat="server" |
| ConnectionString="<%$ ConnectionStrings:ScheduleConnectionString %>" |
| SelectCommand="SELECT [ID], [Subject], [Start], [End], [Facilitator_ID], [RecurrenceRule], [RecurrenceParentID], [Annotations], [Activity_ID], [Client_ID], [Comments], [State] FROM [Appointments]" |
| ConflictDetection="CompareAllValues" |
| DeleteCommand="DELETE FROM [Appointments] WHERE [ID] = @original_ID AND [Subject] = @original_Subject AND [Start] = @original_Start AND [End] = @original_End AND (([Facilitator_ID] = @original_Facilitator_ID) OR ([Facilitator_ID] IS NULL AND @original_Facilitator_ID IS NULL)) AND (([RecurrenceRule] = @original_RecurrenceRule) OR ([RecurrenceRule] IS NULL AND @original_RecurrenceRule IS NULL)) AND (([RecurrenceParentID] = @original_RecurrenceParentID) OR ([RecurrenceParentID] IS NULL AND @original_RecurrenceParentID IS NULL)) AND (([Annotations] = @original_Annotations) OR ([Annotations] IS NULL AND @original_Annotations IS NULL)) AND (([Activity_ID] = @original_Activity_ID) OR ([Activity_ID] IS NULL AND @original_Activity_ID IS NULL)) AND (([Client_ID] = @original_Client_ID) OR ([Client_ID] IS NULL AND @original_Client_ID IS NULL)) AND (([Comments] = @original_Comments) OR ([Comments] IS NULL AND @original_Comments IS NULL)) AND (([State] = @original_State) OR ([State] IS NULL AND @original_State IS NULL))" |
| InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [Facilitator_ID], [RecurrenceRule], [RecurrenceParentID], [Annotations], [Activity_ID], [Client_ID], [Comments], [State]) VALUES (@Subject, @Start, @End, @Facilitator_ID, @RecurrenceRule, @RecurrenceParentID, @Annotations, @Activity_ID, @Client_ID, @Comments, @State)" |
| OldValuesParameterFormatString="original_{0}" |
| UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [Facilitator_ID] = @Facilitator_ID, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Annotations] = @Annotations, [Activity_ID] = @Activity_ID, [Client_ID] = @Client_ID, [Comments] = @Comments, [State] = @State WHERE [ID] = @original_ID AND [Subject] = @original_Subject AND [Start] = @original_Start AND [End] = @original_End AND (([Facilitator_ID] = @original_Facilitator_ID) OR ([Facilitator_ID] IS NULL AND @original_Facilitator_ID IS NULL)) AND (([RecurrenceRule] = @original_RecurrenceRule) OR ([RecurrenceRule] IS NULL AND @original_RecurrenceRule IS NULL)) AND (([RecurrenceParentID] = @original_RecurrenceParentID) OR ([RecurrenceParentID] IS NULL AND @original_RecurrenceParentID IS NULL)) AND (([Annotations] = @original_Annotations) OR ([Annotations] IS NULL AND @original_Annotations IS NULL)) AND (([Activity_ID] = @original_Activity_ID) OR ([Activity_ID] IS NULL AND @original_Activity_ID IS NULL)) AND (([Client_ID] = @original_Client_ID) OR ([Client_ID] IS NULL AND @original_Client_ID IS NULL)) AND (([Comments] = @original_Comments) OR ([Comments] IS NULL AND @original_Comments IS NULL)) AND (([State] = @original_State) OR ([State] IS NULL AND @original_State IS NULL))"> |
| <DeleteParameters> |
| <asp:Parameter Name="original_ID" Type="Int32" /> |
| <asp:Parameter Name="original_Subject" Type="String" /> |
| <asp:Parameter Name="original_Start" Type="DateTime" /> |
| <asp:Parameter Name="original_End" Type="DateTime" /> |
| <asp:Parameter Name="original_Facilitator_ID" Type="Int32" /> |
| <asp:Parameter Name="original_RecurrenceRule" Type="String" /> |
| <asp:Parameter Name="original_RecurrenceParentID" Type="Int32" /> |
| <asp:Parameter Name="original_Annotations" Type="String" /> |
| <asp:Parameter Name="original_Activity_ID" Type="Int32" /> |
| <asp:Parameter Name="original_Client_ID" Type="Int32" /> |
| <asp:Parameter Name="original_Comments" Type="String" /> |
| <asp:Parameter Name="original_State" Type="String" /> |
| </DeleteParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="Subject" Type="String" /> |
| <asp:Parameter Name="Start" Type="DateTime" /> |
| <asp:Parameter Name="End" Type="DateTime" /> |
| <asp:Parameter Name="Facilitator_ID" Type="Int32" /> |
| <asp:Parameter Name="RecurrenceRule" Type="String" /> |
| <asp:Parameter Name="RecurrenceParentID" Type="Int32" /> |
| <asp:Parameter Name="Annotations" Type="String" /> |
| <asp:Parameter Name="Activity_ID" Type="Int32" /> |
| <asp:Parameter Name="Client_ID" Type="Int32" /> |
| <asp:Parameter Name="Comments" Type="String" /> |
| <asp:Parameter Name="State" Type="String" /> |
| <asp:Parameter Name="original_ID" Type="Int32" /> |
| <asp:Parameter Name="original_Subject" Type="String" /> |
| <asp:Parameter Name="original_Start" Type="DateTime" /> |
| <asp:Parameter Name="original_End" Type="DateTime" /> |
| <asp:Parameter Name="original_Facilitator_ID" Type="Int32" /> |
| <asp:Parameter Name="original_RecurrenceRule" Type="String" /> |
| <asp:Parameter Name="original_RecurrenceParentID" Type="Int32" /> |
| <asp:Parameter Name="original_Annotations" Type="String" /> |
| <asp:Parameter Name="original_Activity_ID" Type="Int32" /> |
| <asp:Parameter Name="original_Client_ID" Type="Int32" /> |
| <asp:Parameter Name="original_Comments" Type="String" /> |
| <asp:Parameter Name="original_State" Type="String" /> |
| </UpdateParameters> |
| <InsertParameters> |
| <asp:Parameter Name="Subject" Type="String" /> |
| <asp:Parameter Name="Start" Type="DateTime" /> |
| <asp:Parameter Name="End" Type="DateTime" /> |
| <asp:Parameter Name="Facilitator_ID" Type="Int32" /> |
| <asp:Parameter Name="RecurrenceRule" Type="String" /> |
| <asp:Parameter Name="RecurrenceParentID" Type="Int32" /> |
| <asp:Parameter Name="Annotations" Type="String" /> |
| <asp:Parameter Name="Activity_ID" Type="Int32" /> |
| <asp:Parameter Name="Client_ID" Type="Int32" /> |
| <asp:Parameter Name="Comments" Type="String" /> |
| <asp:Parameter Name="State" Type="String" /> |
| </InsertParameters> |
| </asp:SqlDataSource> |
| </div> |
| <asp:SqlDataSource ID="dsActivity" runat="server" |
| ConnectionString="<%$ ConnectionStrings:ScheduleConnectionString %>" |
| SelectCommand="SELECT [Activity_ID], [Activity_Name], [Description], [Appt_Duration], [Acronym], [Status] FROM [Activity]"> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="dsFacilitator" runat="server" |
| ConnectionString="<%$ ConnectionStrings:ScheduleConnectionString %>" |
| SelectCommand="SELECT [Facilitator_ID], [FirstName], [LastName], [Phone1], [Phone2], [Phone3], [Email1], [Email2], [Status], [LastName] + ', ' + [FirstName] As [Facilitator_Display] FROM [Facilitator]"> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="dsClient" runat="server" |
| ConnectionString="<%$ ConnectionStrings:ScheduleConnectionString %>" |
| SelectCommand="SELECT [Client_ID], [Client_Code], [Client_Name], [Client_Address], [Client_Contact_FirstName], [Client_Contact_LastName], [Client_Phone1], [Client_Phone2], [Client_Phone3], [Client_Email1], [Client_Email2], [Client_Status] FROM [Client]"> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="dsState" runat="server" |
| ConnectionString="<%$ ConnectionStrings:ScheduleConnectionString %>" |
| SelectCommand="SELECT [State], [TimeZoneOffset], [HasDaylightSaving] FROM [State]"> |
| </asp:SqlDataSource> |
| </form> |
| </body> |
| </html> |
| Imports Telerik.Web.UI |
| Imports System.Web.Security |
| Imports System.Web.UI.WebControls |
| Imports System.Data |
| Imports System.Data.Common |
| Imports System.Data.SqlClient |
| Imports System.Drawing |
| Imports System.Collections |
| Imports System.Collections.Generic |
| Partial Class _Default |
| Inherits System.Web.UI.Page |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| End Sub |
| Protected Sub RadScheduler1_AppointmentDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerEventArgs) Handles RadScheduler1.AppointmentDataBound |
| If e.Appointment.Resources.GetResourceByType("Client") <> Nothing Then |
| Select Case e.Appointment.Resources.GetResourceByType("Client").Text |
| Case "Client1" |
| e.Appointment.CssClass = "rsCategoryBlue" |
| Exit Select |
| Case "Client2" |
| e.Appointment.CssClass = "rsCategoryOrange" |
| Exit Select |
| Case "Client13" |
| e.Appointment.CssClass = "rsCategoryGreen" |
| Exit Select |
| Case Else |
| Exit Select |
| End Select |
| End If |
| End Sub |
| Protected Sub btnSubmit_Refinement_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSubmit_Refinement.Click |
| RadScheduler1.GroupBy = ddlGroupBy.SelectedValue |
| RadScheduler1.GroupingDirection = DirectCast([Enum].Parse(GetType(GroupingDirection), ddlGroupingDirection.SelectedValue), GroupingDirection) |
| If chkState.SelectedIndex > -1 Then |
| Dim myStateRefinement As String = "" |
| For Each li As ListItem In chkState.Items |
| If li.Selected = True Then |
| If myStateRefinement = "" Then |
| myStateRefinement = "State = '" & li.Value & "'" |
| Else |
| myStateRefinement += " OR State = '" & li.Value & "'" |
| End If |
| End If |
| Next |
| dsState.SelectCommand = "Select * FROM State where " & myStateRefinement |
| dsState.DataBind() |
| dsSchedule.SelectCommand = "Select * FROM Appointments where " & myStateRefinement |
| dsSchedule.DataBind() |
| End If |
| End Sub |
| Protected Sub RadScheduler1_AppointmentCreated(ByVal sender As Object, ByVal e As AppointmentCreatedEventArgs) |
| Dim Facilitator As Resource = e.Appointment.Resources.GetResourceByType("Facilitator") |
| 'Dim assignedTo As Label = DirectCast(e.Container.FindControl("AssignedTo"), Label) |
| 'assignedTo.Text = "Held by: " + Facilitator.Text |
| End Sub |
| Protected Function GetAvailableFacilitators(ByVal container As Control) As IEnumerable |
| Dim appointment As Appointment = (DirectCast(container, SchedulerFormContainer)).Appointment |
| Dim availableFacilitator As New List(Of Resource)(RadScheduler1.Resources.GetResourcesByType("Facilitator")) |
| For Each appointmentInRange As Appointment In RadScheduler1.Appointments.GetAppointmentsInRange(appointment.Start, appointment.[End]) |
| If appointmentInRange Is appointment Then |
| Continue For |
| End If |
| For Each occupiedFacilitator As Resource In appointmentInRange.Resources.GetResourcesByType("Facilitator") |
| availableFacilitator.Remove(occupiedFacilitator) |
| Next |
| Next |
| Return availableFacilitator |
| End Function |
| End Class |
| <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="rad" %> |
| <!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> |
| <asp:Panel class="clientheading" ID="Panel1" runat="server" BorderWidth="0px" Visible="False"> |
| <asp:Label ID="header1" runat="server" >Test</asp:Label> |
| </asp:Panel> |
| <rad:RadScriptManager runat="server" ID="RadScriptManager1" /> |
| <rad:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <rad:AjaxSetting AjaxControlID="checkbox1"> |
| <UpdatedControls> |
| <rad:AjaxUpdatedControl ControlID="label1" /> |
| <rad:AjaxUpdatedControl ControlID="button1" /> |
| <rad:AjaxUpdatedControl ControlID="lblMessage" /> |
| </UpdatedControls> |
| </rad:AjaxSetting> |
| </AjaxSettings> |
| </rad:RadAjaxManager> |
| </div> |
| <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label> |
| <table id="Table1" runat="server"> |
| <tr> |
| <td><asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" /></td> |
| </tr> |
| <tr> |
| <td><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></td> |
| </tr> |
| </table> |
| <table id="Table2" runat="server"> |
| <tr> |
| <td><asp:Button ID="Button1" runat="server" Text="Not checked" /></td> |
| </tr> |
| </table> |
| </form> |
| </body> |
| </html> |
| Partial Class _Default |
| Inherits System.Web.UI.Page |
| Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click |
| If Not Me.CheckBox1.Checked Then |
| Me.lblMessage.Text = "Not checked" |
| Me.lblMessage.Visible = True |
| Else |
| Response.Redirect("page2.aspx") |
| End If |
| End Sub |
| Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged |
| Me.lblMessage.Text = "" |
| Me.Label1.Text = "Checked = " & Me.CheckBox1.Checked.ToString |
| If Me.CheckBox1.Checked Then |
| Me.Button1.Text = "Checked" |
| Else |
| Me.Button1.Text = "Not Checked" |
| End If |
| End Sub |
| End Class |
<
rad:AjaxUpdatedControl ControlID="button1" />
This only seems to happen in ie due to the fact that in firefox when I hit the collapse button the url changes to show the page and the query string.
IE show the telrik grid with the skins, but in firefox it does not show the telerik skins