<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MyRuntimeEditor.aspx.vb" Inherits="MyRuntimeEditor" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><%@ Register Namespace="MyCustomEditors" TagPrefix="mycustom" %><!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 id="Head1" runat="server"> <title></title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <asp:Button ID="Button1" Text="Postback" runat="server" /> <telerik:RadFilter runat="server" OnFieldEditorCreating="RadFilter1_FieldEditorCreating" OnApplyExpressions="RadFilter1_ApplyExpressions"> <FieldEditors> <mycustom:MyRadFilterDropDownEditor DataTextField="Text" DataValueField="Value" FieldName="USR_ID" DataType="System.Int32" DisplayName="User name" DDLType="Usernames" /> <mycustom:MyRadFilterDropDownEditor DataTextField="Text" DataValueField="Value" FieldName="PNT_ID" DataType="System.Int32" DisplayName="Note" DDLType="PartyNotes" /> <mycustom:MyRadFilterDropDownEditor DataTextField="Text" DataValueField="Value" FieldName="PGT_ID" DataType="System.Int32" DisplayName="Group" DDLType="PartyGroups" /> </FieldEditors> </telerik:RadFilter> Expression: <asp:Label runat="server" ID="Log"/> </div> </form></body></html>Imports SystemImports System.Collections.GenericImports System.LinqImports System.WebImports System.Web.UIImports System.Web.UI.WebControlsImports Telerik.Web.UIImports CustomEditorsImports MyCustomEditorsPartial Class MyRuntimeEditor Inherits System.Web.UI.Page Protected Sub RadFilter1_ApplyExpressions(ByVal sender As Object, ByVal e As RadFilterApplyExpressionsEventArgs) Dim provider As New RadFilterSqlQueryProvider() provider.ProcessGroup(e.ExpressionRoot) Log.Text = provider.Result End Sub Protected Sub RadFilter1_FieldEditorCreating(ByVal sender As Object, ByVal e As RadFilterFieldEditorCreatingEventArgs) e.Editor = New MyRadFilterDropDownEditor() End SubEnd ClassImports SystemImports System.Collections.GenericImports System.LinqImports System.WebImports Telerik.Web.UIImports System.Web.UIImports System.CollectionsNamespace CustomEditors Public Class RadFilterDropDownEditor Inherits RadFilterDataFieldEditor Public Property DataTextField() As String Get Return If(DirectCast(ViewState("DataTextField"), String), String.Empty) End Get Set(ByVal value As String) ViewState("DataTextField") = value End Set End Property Public Property DataValueField() As String Get Return If(DirectCast(ViewState("DataValueField"), String), String.Empty) End Get Set(ByVal value As String) ViewState("DataValueField") = Value End Set End Property Public Property DataSourceID() As String Get Return If(DirectCast(ViewState("DataSourceID"), String), String.Empty) End Get Set(ByVal value As String) ViewState("DataSourceID") = Value End Set End Property Private _combo As RadComboBox Protected Overrides Sub CopySettings(ByVal baseEditor As RadFilterDataFieldEditor) MyBase.CopySettings(baseEditor) Dim editor As RadFilterDropDownEditor = TryCast(baseEditor, RadFilterDropDownEditor) If editor IsNot Nothing Then DataSourceID = editor.DataSourceID DataTextField = editor.DataTextField DataValueField = editor.DataValueField End If End Sub Public Overrides Function ExtractValues() As System.Collections.ArrayList Dim list As New ArrayList() list.Add(_combo.SelectedValue) Return list End Function Public Overrides Sub InitializeEditor(container As System.Web.UI.Control) _combo = New RadComboBox() _combo.ID = "MyCombo" _combo.DataTextField = DataTextField _combo.DataValueField = DataValueField _combo.DataSourceID = DataSourceID container.Controls.Add(_combo) End Sub Public Overrides Sub SetEditorValues(values As System.Collections.ArrayList) If values IsNot Nothing AndAlso values.Count > 0 Then If values(0) Is Nothing Then Return End If AddHandler _combo.DataBound, _ Sub(sender, args) Dim item As RadComboBoxItem = _combo.FindItemByValue(values(0).ToString()) If item IsNot Nothing Then item.Selected = True End If End Sub End If End Sub End ClassEnd NamespaceImports Microsoft.VisualBasicImports System.DataPublic Class DataObject Public Function GetUsers() As DataTable Dim dt As DataTable = CreateDataTable() dt.Rows.Add(CreateDataRow(dt.NewRow(), 1, "Joe One")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 2, "Joe Two")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 3, "Joe Three")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 4, "Joe Four")) Return dt End Function Public Function GetNoteTypes() As DataTable Dim dt As DataTable = CreateDataTable() dt.Rows.Add(CreateDataRow(dt.NewRow(), 1, "Internal")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 2, "Email")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 3, "Phone")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 4, "Sales Call")) Return dt End Function Public Function GetPartyGroups() As DataTable Dim dt As DataTable = CreateDataTable() dt.Rows.Add(CreateDataRow(dt.NewRow(), 1, "Internet Lead")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 2, "Website")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 3, "Cold calling")) dt.Rows.Add(CreateDataRow(dt.NewRow(), 4, "Phoned in")) Return dt End Function Private Function CreateDataRow(ByVal r As DataRow, ByVal Value As Integer, ByVal Text As String) As DataRow r("Value") = Value r("Text") = Text Return r End Function Private Function CreateDataTable() As DataTable Dim dt As New DataTable dt.Columns.Add("Value", GetType(Integer)) dt.Columns.Add("Text", GetType(String)) Return dt End FunctionEnd Class
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" > <Windows> <telerik:RadWindow id="RadWindow2" runat="server" Width="400px" Height="300px" style="z-index:100000;" VisibleTitlebar="false" VisibleStatusbar="false" BackColor="#cccccc" title="Telerik RadWindow" VisibleOnPageLoad="false" > </telerik:RadWindow> </Windows> </telerik:RadWindowManager> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function UseMainRadWindow() { var oWindow = radopen("http://zajal.rayanet.co.il/Common/Alerts/Silverlight/Default.aspx", "RadWindow2"); oWindow.set_visibleTitlebar(false); oWindow.set_visibleStatusbar(false); } function onloadFunction() { var slVersion = GetSilverlightVersion(); if (slVersion != -1) UseMainRadWindow(); } </script> </telerik:RadCodeBlock>When using the RadFileExplorer in IE (and IE only…Firefox, Safari, Chrome all handle the following perfectly/quickly…only IE has the issue), if the directory has a lot of images in it (say, 50 or more, or perhaps the file sizes of the images are quite large), the launching of this tool will literally FREEZE the IE browser for 30-60 seconds (IE's windows-bar displays "(Not Responding)" if you try to click anywhere in the window). The RadEditor is a part of our online application where significant numbers of fairly novice users utilize it to build simple email content. So…the patience level of these authors is very low, and they often will simply attempt to close the browser, as they believe the system has crashed….when in fact, if they just waited 30-60 seconds the problem would go away.

function OnClientRated(sender, args){ ...}