How can I stop timer(in other words stop browser refresh/page refresh), while dragging a task from RadGrid to RadScheduler and how can I start timer(in other words start browser refresh/page refresh), after the task is dropped.
My drag and drop is similar to this demo
http://demos.telerik.com/aspnet-ajax/scheduler/examples/draganddropintegration/defaultcs.aspx?product=scheduler
This is my code for RadScheduler:
<telerik:RadScheduler ID="rsTicketsSchedule" runat="server" AllowInsert="False" DisplayDeleteConfirmation="False"
Localization-HeaderToday="Today" EnableCustomAttributeEditing="True" EnableDescriptionField="True"
Height="100%" EnableExactTimeRendering="true" EnableViewState="true" OverflowBehavior="Scroll"
ShowAllDayRow="false" OnAppointmentDataBound="TicketsSchedule_AppointmentDataBound"
OnNavigationComplete="rsTicketsSchedule_NavigationComplete" OnNavigationCommand="rsTicketsSchedule_NavigationCommand"
OnTimeSlotCreated="rsTicketsSchedule_TimeSlotCreated" OnAppointmentUpdate="onApptUpdate"
OnClientAppointmentDoubleClick="rsClientAppointmentDoubleClick" OnClientAppointmentClick="singleClick"
OnClientAppointmentContextMenu="CheckTimerStatus" OnClientAppointmentContextMenuItemClicked="handleClick"
OnClientFormCreated="ClientFormCreated" OnDataBound="rsTicketsSchedule_DataBound"
OnClientAppointmentMoveEnd="AppointmentMoved" OnClientAppointmentDeleting="OnClientAppointmentDeleting"
OnClientAppointmentMoveStart="StopTimer"
CustomAttributeNames="HasAttachment" DataReminderField="Reminder" OnClientAppointmentEditing= "StopTimer" >
<AppointmentTemplate>
<div>
<asp:Panel ID="RecurrencePanel" CssClass="rsAptRecurrence" runat="server" Visible="false" />
<asp:Panel ID="RecurrenceExceptionPanel" CssClass="rsAptRecurrenceException" runat="server"
Visible="false" />
<%-- <asp:Panel ID="ReminderPanel" CssClass="rsAptReminder" runat="server" Visible="true" />--%>
<div id="ApptImageDiv" style="text-align:right; position:absolute; width:95%;" >
<asp:Image ID="ApptAttachmentImg" runat="server" Width="16px" Height="17px" style=" margin-right:5px; background:url(img/sprite-alpha.png)-166px -34px no-repeat; background-position: -98px -66px; border:transparent; "
Visible='<%# String.IsNullOrEmpty(Container.Appointment.Attributes["HasAttachment"])? false : Boolean.Parse(Container.Appointment.Attributes["HasAttachment"]) %>'
/>
</div>
<%#Eval("Subject") %>
</div>
</AppointmentTemplate >
<AppointmentContextMenus >
</AppointmentContextMenus>
<DayView UserSelectable="True" GroupBy="TechName" GroupingDirection="Horizontal" />
<WeekView UserSelectable="True" GroupBy="TechName" GroupingDirection="Vertical" />
<MonthView UserSelectable="True" GroupBy="TechName" GroupingDirection="Vertical" />
<TimelineView ColumnHeaderDateFormat="h:mm tt" GroupingDirection="Vertical" HeaderDateFormat="MM/dd/yyyy h:mm tt"
NumberOfSlots="21" SlotDuration="00:30:00" StartTime="08:00:00" />
<AdvancedForm EnableCustomAttributeEditing="True" Modal="True" />
<ResourceTypes>
<telerik:ResourceType Name="TechName" />
<telerik:ResourceType Name="TicketState" />
</ResourceTypes>
<Reminders Enabled="true"></Reminders>
</telerik:RadScheduler>
Thanks for your help in advance
<telerik:RadGrid ID="RadGrid4" runat="server" Width="99.7%" PageSize="20" AllowPaging="false" AllowSorting="True" AllowFilteringByColumn="false" AllowMultiRowSelection="True" ShowGroupPanel="false" GridLines="None" ShowFooter="false" ShowHeader="true" GroupingEnabled="false" Skin="WebBlue" EnableHeaderContextAggregatesMenu="false" EnableHeaderContextMenu ="false" AutoGenerateColumns="false" EnableViewState="True" OnItemCommand="RadGrid4_OnItemCommand" OnDetailTableDataBind="RadGrid4_DetailTableDataBind" OnItemDataBound="RadGrid4_OnItemDataBound" OnNeedDataSource="RadGrid4_NeedDataSource" OnGroupsChanging="RadGrid4_OnGroupsChanging" OnColumnsReorder="RadGrid4_OnColumnsReorder"> <MasterTableView HierarchyLoadMode="ServerBind" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowExportToExcelButton="true" CommandItemSettings-ShowExportToWordButton="true" CommandItemSettings-ShowExportToPdfButton="true" CommandItemSettings-ShowExportToCsvButton="true" AllowMultiColumnSorting="true" Caption=""> <Columns> <telerik:GridTemplateColumn HeaderText="Name" meta:resourcekey="labName" UniqueName="strEnterpriseSiteContactNameValue" HeaderStyle-Width="50%" Resizable="true" Reorderable="true" SortExpression="strEnterpriseSiteContactNameValue"> <ItemTemplate> <%# Eval("strEnterpriseSiteContactNameValue")%> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Title" meta:resourcekey="labTitle" UniqueName="strEnterpriseSiteContactTitleValue" HeaderStyle-Width="50%" Resizable="true" Reorderable="true" SortExpression="strEnterpriseSiteContactTitleValue"> <ItemTemplate> <%# Eval("strEnterpriseSiteContactTitleValue")%> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Company" meta:resourcekey="labCompany" UniqueName="strEnterpriseSiteContactCompanyValue" HeaderStyle-Width="50%" Resizable="true" Reorderable="true" SortExpression="strEnterpriseSiteContactCompanyValue"> <ItemTemplate> <%# Eval("strEnterpriseSiteContactCompanyValue")%> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> <DetailTables> <telerik:GridTableView ShowHeader="false" Name="Detail"> <Columns> <telerik:GridTemplateColumn HeaderText="" UniqueName="strEnterpriseSiteContactField" HeaderStyle-Width="25%" ItemStyle-CssClass="GridFieldColumn" Resizable="true" Reorderable="true"> <ItemTemplate> <%# Eval("strEnterpriseSiteContactField")%> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="" UniqueName="strEnterpriseSiteContactFieldValue" HeaderStyle-Width="75%" Resizable="true" Reorderable="true"> <ItemTemplate> <%# Eval("strEnterpriseSiteContactFieldValue")%> <asp:HyperLink ID="hlEnterpriseSiteContact" Target="_blank" runat="server" Text='<%# Eval("strEnterpriseSiteContactLinkResource")%>' NavigateUrl='<%# Eval("strEnterpriseSiteContactLinkValue")%>'></asp:HyperLink> <asp:Image runat="server" ID="imageProfile" ImageUrl='<%# "ImageHandler.ashx?FileLocation=" + DataBinder.Eval(Container.DataItem, "strEnterpriseSiteContactProfileImageDirectoryPath") + "&FileName=" + DataBinder.Eval(Container.DataItem, "strEnterpriseSiteContactProfileImageFilePath") %>' AlternateText="" Height="80px" Width="65px" BorderWidth="0"></asp:Image> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </telerik:GridTableView> </DetailTables> </MasterTableView> <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> <ClientSettings AllowRowsDragDrop="false" AllowDragToGroup="false" AllowColumnsReorder="false" ReorderColumnsOnClient="false" ColumnsReorderMethod="Reorder"> <Resizing AllowRowResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="false" AllowColumnResize="true" AllowResizeToFit="true"/> <Animation AllowColumnReorderAnimation="false" AllowColumnRevertAnimation="true" /> <Selecting AllowRowSelect="false" /> </ClientSettings> <SortingSettings SortedBackColor="Azure" EnableSkinSortStyles="false" /> <GroupingSettings ShowUnGroupButton="true" /> </telerik:RadGrid>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.SystemException: System.ArgumentException: Illegal characters in path. at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str) at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) at System.Web.InternalSecurityPermissions.PathDiscovery(String path) at System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) at System.Web.HttpRequest.MapPath(VirtualPath virtualPath) at System.Web.HttpServerUtility.MapPath(String path) at Telerik.Web.Apoc.Image.ApocImageFactory.TryMapPath(String path, String& physPath) at Telerik.Web.Apoc.Image.ApocImageFactory.Make(String href) at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region) at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area) at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree) at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence) at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement() at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)ajaxManager.AjaxSettings.AddAjaxSetting(cb1, cb2, null, UpdatePanelRenderMode.Inline);AjaxSetting setting = new AjaxSetting(cb1.ID); setting.UpdatedControls.Add(new AjaxUpdatedControl(cb2.ID, null) { UpdatePanelRenderMode = UpdatePanelRenderMode.Inline }); ajaxManager.AjaxSettings.Add(setting);
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<!
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" />
<script type="text/javascript">
function Is_Event_selected(sender, args) {
debugger;
var lstbox = $find("lstEvents");
var chkedItems_Count = lstbox.get_checkedItems().length;
args.IsValid = chkedItems_Count > 0;
}
</script>
</
head>
<
body>
<form id="form1" runat="server">
<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>
<script type="text/javascript">
//Put your JavaScript code here.
</script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<div>
<asp:CustomValidator ID="CV_lstEvents" runat="server" ValidateEmptyText="true" ClientValidationFunction="Is_Event_selected"
ControlToValidate="lstEvents" ErrorMessage="please Select Items(s)" ValidationGroup="Event_Group_Validation">
</asp:CustomValidator>
<telerik:RadListBox ID="lstEvents" runat="server" Width="100%" MaxHeight="225px"
CheckBoxes="true" AutoPostBack="false" EmptyMessage="Select Event" CausesValidation="false" >
<Items>
<telerik:RadListBoxItem Text="Ajax Controls" Value="0" />
<telerik:RadListBoxItem Text="BI Controls" Value="1" />
<telerik:RadListBoxItem Text="SilverLight" Value="2" />
<telerik:RadListBoxItem Text="KenDo UI" Value="3" />
</Items>
</telerik:RadListBox>
<asp:Button ID="btn" runat="server" ValidationGroup="Event_Group_Validation" />
</div>
</form>
</
body>
</
html>

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><!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> <script type="text/javascript"> var isTimeSelected = false; function DateSelected(sender, args) { if (!isTimeSelected) sender.get_timeView().setTime(null, 23, 59, 0); isTimeSelected = false; } function ClientTimeSelected(sender, args) { isTimeSelected = true; } </script></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server"> <ClientEvents OnDateSelected="DateSelected" /> <TimeView ID="TimeView1" runat="server" OnClientTimeSelected="ClientTimeSelected"> </TimeView> </telerik:RadDateTimePicker> </div> </form></body></html>
A sample of what ideal code would look like would look something like this:
| Dim drp As New Telerik.Web.UI.RadComboBox |
| drp.ID = input_name |
| drp.Skin = "Vista" |
| drp.Width = Unit.Percentage(75) |
| drp.AllowCustomText = False |
| drp.MarkFirstMatch = True |
| drp.EmptyMessage = "Select State" |
| Dim li As New Telerik.Web.UI.RadComboBoxItem |
| li.ForeColor = Color.DarkGray |
| li.Font.Italic = True |
| li.Text = "Texas" |
| li.Value = "TX" |
| drp.Items.Add(li) |
(the code below worked great, BTW)
Thanks, Laird Rixford
Insurance Website Builder
|
|
|
|
|