I have code that binds a generic list of resources through a linqdatasource on the server side. I would like to be able to access some of the resource attributes client side. For example, I have a data key called "RoomEmail" that I would like to be able to access from the client. I tried adding the the key to the CustomAttributeNames property but the _attributes array still shows no items for each room when I pull it up in firebug. How can I pass the data to the client side?
| <asp:UpdatePanel ID="UpdatePanel1" runat="server"> |
| <ContentTemplate> |
| <telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedView="TimelineView" |
| OnAppointmentDataBound="RadScheduler1_OnAppointmentDataBound" TimelineView-HeaderDateFormat="D" |
| DataSourceID="dsEventsDataSource" Skin="Office2007" GroupBy="Room" GroupingDirection="Vertical" |
| DayStartTime="08:00:00" DayEndTime="23:30:00" TimeZoneOffset="03:00:00" DataKeyField="Conf_ID" |
| DataSubjectField="Conference_Name" DataStartField="Start" DataEndField="End" |
| OverflowBehavior="Expand" ShowViewTabs="false" ColumnWidth="10px" Width="950px" |
| Height="400px" CustomAttributeNames="Conf_ID,Name,RoomID,RoomEmail" OnAppointmentCommand="RadScheduler1_OnAppointmentCommand" |
| OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated" RowHeight="40px" |
| MultiDayView-NumberOfDays="2" RowHeaderWidth="100px" EnableDatePicker="false" |
| ShowNavigationPane="false" AllowInsert="false" AllowEdit="false" AllowDelete="false"> |
| <AdvancedForm Modal="true" /> |
| <TimelineView NumberOfSlots="192" SlotDuration="0:15" ColumnHeaderDateFormat="h tt" |
| TimeLabelSpan="4" /> |
| <ResourceTypes> |
| <telerik:ResourceType KeyField="RoomID" Name="Room" TextField="Name" ForeignKeyField="RoomID" |
| DataSourceID="dsRoomsDataSource" /> |
| </ResourceTypes> |
| <ResourceHeaderTemplate> |
| <asp:LinkButton ID="btnRemove" runat="server" Text="X" CommandName="RemoveResource" |
| CausesValidation="false" CssClass="ui-icon ui-icon-trash" Style="float: left" |
| OnClientClick="return confirm('Are you sure you want to remove this room?')" /> |
| <asp:Label ID="ResourceLabel" runat="server" /> |
| </ResourceHeaderTemplate> |
| </telerik:RadScheduler> |
| <asp:LinqDataSource ID="dsEventsDataSource" runat="server" OnSelecting="dsEventsDataSource_OnSelecting"> |
| </asp:LinqDataSource> |
| <asp:LinqDataSource ID="dsRoomsDataSource" runat="server" OnSelecting="dsRoomsDataSource_OnSelecting"> |
| </asp:LinqDataSource> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| protected void dsRoomsDataSource_OnSelecting(object sender, LinqDataSourceSelectEventArgs e) |
| { |
| e.Result = Rooms; |
| } |
| public class Room |
| { |
| public Guid RoomID { get; set; } |
| public string Name { get; set; } |
| public bool Host { get; set; } |
| public bool Presenting { get; set; } |
| public int Attendees { get; set; } |
| public bool ClientsPresent { get; set; } |
| public string RoomEmail { get; set; } |
| public string Tools { get; set; } |
| public string Comments { get; set; } |
| public List<RoomSchedule> Schedules { get; set; } |
| } |