| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID = "RadAjaxManager1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID ="GridAct" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| function refreshTasks() |
| { |
| var ajaxManager = $find("RadAjaxManager1"); |
| ajaxManager.AjaxRequest('RebindTasks'); |
| } |
| Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest |
| If e.Argument = "RebindTasks" Then |
| GridAct.Rebind() |
| End If |
| End Sub |
| function OnClicking(sender, eventArgs) |
| { |
| if (eventArgs.Item.NavigateUrl != "#") |
| { |
| var proceed = confirm("Navigate to "+ eventArgs.Item.NavigateUrl + " ?"); |
| if (!proceed) |
| { |
| return false; |
| } |
| } |
| } |
| <telerik:RadMenu ID="RadMenu1" Runat="server" OnClientItemClicking="OnClicking" |
| style="top: 0px; left: 11px; height: 23px; width: 200px" Skin="Telerik" |
| Font-Size="Small"> |
| <DefaultGroupSettings ExpandDirection="Auto" Flow="Vertical" Height="135px" /> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| <ExpandAnimation Type="OutQuart" /> |
| <Items> |
| <telerik:RadMenuItem Text="Channel 8" Runat="server" GroupSettings-Height="400"> |
| <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px"> |
| </GroupSettings> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem Text="Channel 9" Runat="server" GroupSettings-Height="400"> |
| <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px"> |
| </GroupSettings> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem Text="Channel 10" Runat="server" GroupSettings-Height="400"> |
| <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px"> |
| </GroupSettings> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem Text="Technet EDGE" Runat="server" GroupSettings-Height="400"> |
| <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px"> |
| </GroupSettings> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem Text="VisitMIX Online" Runat="server" GroupSettings-Height="400"> |
| <GroupSettings Flow="Vertical" ExpandDirection="Auto" Height="400px"> |
| </GroupSettings> |
| </telerik:RadMenuItem> |
| </Items> |
| </telerik:RadMenu> |
| // FileInfo object creation |
| System.IO.FileInfo targetFile = new System.IO.FileInfo(filePath); |
| // clear the current output content from the buffer |
| HttpContext.Current.Response.Clear(); |
| // add the header that specifies the default filename for |
| // the Download/SaveAs dialog |
| HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + targetFile.Name); |
| // add the header that specifies the file size, so that the browser |
| // can show the download progress |
| HttpContext.Current.Response.AddHeader("Content-Length", targetFile.Length.ToString()); |
| // specify that the response is a stream that cannot be read by the |
| // client and must be downloaded |
| HttpContext.Current.Response.ContentType = GetFileType(targetFile.FullName.ToLower().Substring(targetFile.FullName.Length - 4)); |
| // send the file stream to the client |
| HttpContext.Current.Response.WriteFile(targetFile.FullName); |
| // stop the execution of this page |
| HttpContext.Current.Response.End(); |
| Error: [Exception... "'Sys.WebForms.PageRequestManagerParserErrorException: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. |
| Details: Error parsing near '%PDF-1.6 |
| %ýýýý |
| 9 0 '.' when calling method: [nsIOnReadyStateChangeHandler::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no] |
On my web page I have a Scheduler and a dropdown. I need to rebind a new set of data to the scheduler on the dropdown SelectedIndexChanged event based on selected value from the dropdown list. My scheduler works fine when I bind the datatable to scheduler on the page_load event for the first time. But when I rebind the new set of data on dropdown SelectedIndexChanged event, the scheduler is empty; though I have 100s of records exists in the new datatable. Is it happening because I am missing something?.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CounselorName()
End If
RadScheduler1.DataSource = getAppointments
End Sub
Private ReadOnly Property getAppointments() As DataTable
Get
Dim dt As DataTable = CType(Session(AppointmentsKey), DataTable)
If dt Is Nothing Then
dt = CreateDataTable()
Session(AppointmentsKey) = dt
End If
Return dt
End Get
End Property
Private Function CreateDataTable() As DataTable
Dim dt As New DataTable
Dim repAppt As New _APPT()
repAppt.LoadApptsbyRepID(RepId)
dt = repAppt.DefaultView.Table
Return dt
End Function
Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim schedule As New _APPT()
Dim item As String = Me.ListBox1.SelectedItem.Text()
RepId = Me.ListBox1.SelectedValue()
Session(AppointmentsKey) = Nothing
RadScheduler1.DataSource = getAppointments
End Sub

