or
<%@ Page Language="VB" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><%@ Register TagPrefix="xx" Namespace="Example" %><%@ Import Namespace="System.Linq" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> Protected Sub grdExample_NeedDataSource(ByVal sender As Object, ByVal e As GridNeedDataSourceEventArgs) Dim Landmarks() As Landmark Landmarks = {New Landmark With {.Name = "Wrigley Field", .AddressId = 3}, _ New Landmark With {.Name = "British PM Residence", .AddressId = 1}, _ New Landmark With {.Name = "Hofbräuhaus", .AddressId = 4}, _ New Landmark With {.Name = "Whitehouse", .AddressId = 2}} grdExample.DataSource = Landmarks End Sub Protected Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) If CType(Session.Item("addrCollection"), Address()) Is Nothing Then Call Session.Add("addrCollection", _ {New Address With {.Id = 1, .Street = "10 Downing St", .City = "London", .PostalCode = "SW1A 2AA", .Province = "England", .Country = "UK"}, _ New Address With {.Id = 2, .Street = "1600 Pennsylvania Ave NW", .City = "Washington", .PostalCode = "20500", .Province = "District of Columbia", .Country = "USA"}, _ New Address With {.Id = 3, .Street = "1060 W. Addison St", .City = "Chicago", .PostalCode = "60613", .Province = "Illinois", .Country = "USA"}, _ New Address With {.Id = 4, .Street = "Am Platzl 9", .City = "Munich", .PostalCode = "D-80331", .Province = "Bavaria", .Country = "Germany"}}) End If End Sub </script><html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Sorting Issue</title> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <div> <telerik:RadGrid ID="grdExample" runat="server" OnNeedDataSource="grdExample_NeedDataSource" AllowSorting="true" AutoGenerateColumns="false" > <MasterTableView> <Columns> <telerik:GridBoundColumn DataField="Name" HeaderText="Landmark" /> <telerik:GridNumericColumn DataField="AddressId" HeaderText="Address ID" /> <xx:SampleColumn DataField="AddressId" HeaderText="Country" /> <xx:SampleColumn DataField="AddressId" HeaderText ="Province" /> <xx:SampleColumn DataField="AddressId" HeaderText="City" /> <xx:SampleColumn DataField="AddressId" HeaderText="Street Address" /> <xx:SampleColumn DataField="AddressId" HeaderText="Postal Code" /> </Columns> </MasterTableView> </telerik:RadGrid> </div> </form> </body></html>Classes:
Option Infer OffOption Strict OnOption Explicit OnImports Telerik.Web.UIImports System.Web.HttpContextNamespace Example Public Class SampleColumn Inherits GridBoundColumn Protected Overrides Function FormatDataValue(ByVal dataValue As Object, ByVal item As GridItem) As String Dim lm As Landmark Dim Addresses As IEnumerable(Of Address) Dim address As Address lm = CType(item.DataItem, Landmark) Addresses = CType(Current.Session.Item("addrCollection"), Address()) address = Addresses.First(Function(a As Address) a.Id = lm.AddressId) Select Case MyBase.HeaderText Case "Street Address" Return address.Street Case "City" Return address.City Case "Postal Code" Return address.PostalCode Case "Province" Return address.Province Case "Country" Return address.Country Case Else Return "Huh?" End Select End Function End ClassEnd NamespacePublic Class Landmark Public Property Name As String Public Property AddressId As IntegerEnd ClassPublic Class Address Public Property Id As Integer Public Property Street As String Public Property City As String Public Property Province As String Public Property PostalCode As String Public Property Country As StringEnd Class

<telerik:RadToolBarSplitButton CommandName="Action" EnableDefaultButton="true" DefaultButtonIndex="0" > <Buttons> <telerik:RadToolBarButton runat="server" CommandArgument="Local" Text="Local"> </telerik:RadToolBarButton> <telerik:RadToolBarButton runat="server" CommandArgument="Window" Text="Local"> </telerik:RadToolBarButton> </Buttons> </telerik:RadToolBarSplitButton>Message: 'Telerik.Web.RadDatePickerPopupDirection.BottomRight' is null or not an objectLine: 10Char: 1Code: 0URI: http://winsps:81/ScriptResource.axd?d=bObZWqwCQ27Ew08lmqPNpb0hb8fJTnibHARVcv144jcy-xsybBbpW2-eVsV7j6KK0uXqcrwPXYjDG7a0xE21XjhSGd74A1Rz1mUaexrDlmyegEDFO2BCvt6XFVMhD-xk0&t=ffffffffb564747d<script type="text/javascript"> function OnClientAppointmentMoving(sender, eventArgs) { eventArgs.set_cancel(true); } </script> <style>.rsAptDelete{//display: none;}.rsModalDialog { top:300px!important; }.rsAptResize{display:none;}</style><asp:UpdatePanel runat="server" ID="UpdatePanel1"> <ContentTemplate> <telerik:RadScheduler runat="server" ID="RadScheduler1" FirstDayOfWeek="Monday" RowHeaderWidth="52px" DayStartTime="06:00:00" DayEndTime="22:30:00" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="ID" OnAppointmentCreated="RadScheduler1_AppointmentCreated" SelectedView="TimelineView" GroupBy="Rooms" GroupingDirection="Vertical" OverflowBehavior="Expand" StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true" TimelineView-NumberOfSlots="7" TimelineView-ColumnHeaderDateFormat ="dd/MMM <br />(ddd)" TimelineView-HeaderDateFormat="dd/MM/yyyy" RowHeight="80px" LastDayOfWeek="Friday" onnavigationcomplete="RadScheduler1_NavigationComplete" OnClientAppointmentMoving="OnClientAppointmentMoving" OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" onformcreated="RadScheduler1_FormCreated"> <AdvancedForm Modal="true" /> <TimelineView UserSelectable="false" StartTime="06:00" /> <WeekView UserSelectable="false" /> <MonthView UserSelectable="false" /> <DayView UserSelectable="false" /> <TimeSlotContextMenuSettings EnableDefault="true" /> <AppointmentContextMenuSettings EnableDefault="false" /> <AppointmentTemplate> <b> <asp:Label runat="server" ID="AssignedTo" /></b> <%# Eval("Subject") %> </AppointmentTemplate> </telerik:RadScheduler> </ContentTemplate></asp:UpdatePanel>