
After much pain and agony with RadPanelBar and user controls, I'm trying a different approach in using ItemTemplates for the Panel bar items with databinding to a custom object collection. Now I'm having problems collapsing the different items. I know that I cannot collapse root items and have tried to follow your examples on how structure my panel bar properly to allow for collapse/expand but I cannot find any documentation in regards to data-bound panel bars.. and I cannot spend anymore time on this one little part of my website.
Here's my markup, designed per http://www.telerik.com/help/aspnet-ajax/panelbar-troubleshooting-root-items-collapse.html:
| <telerik:RadPanelBar ID="radPanelBarAccountList" Runat="server" Height="200%" |
| Width="100%" Skin="Vista" AllowCollapseAllItems="True"> |
| <Items> |
| <telerik:RadPanelItem runat="server" Text="Replace With Account Name"> |
| <Items> |
| <telerik:RadPanelItem> |
| <ItemTemplate> |
| <UC1:AccountInfo ID="AccountInfo1" runat="server" AccountID='<%# DataBinder.Eval(Container.DataItem, "Id") %>' /> |
| </ItemTemplate> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelBar> |
| 'Get collection of accounts |
| Dim accountCollection As Collection(Of FIAccount) |
| Dim accountsPresenter = New AccountsPresenter(New Guid(Session("SubscriberId").ToString), BasePage.GetCultureName.ToString()) |
| accountCollection = accountsPresenter.GetAccounts("Actual", False, Account.AccountStatus.All) |
| 'Bind panel bar |
| With radPanelBarAccountList |
| .DataSource = accountCollection.ToList |
| .DataTextField = "Name" |
| .DataValueField = "Id" |
| .DataBind() |
| End With |
In a RadScheduler how do I get the month of the appointment from the following code and how do I set the default month for the scheduler during page load (code behind)?
function onAppointmentClick(sender, eventArgs)
{
window.location.href = "Events.aspx?event=" + eventArgs.get_appointment().get_id();
}
Thanks
Robert
| <telerik:RadGrid runat="server" ID="RadGrid1" Skin="WebBlue" PagerStyle-AlwaysVisible="true" GridLines="Horizontal" AutoGenerateColumns="true" OnNeedDataSource="RadGrid1_NeedDataSource" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" OnUpdateCommand="RadGrid1_UpdateCommand" AllowPaging="true" PageSize="20" OnItemDataBound="RadGrid1_ItemDataBound1"> |
| <MasterTableView AutoGenerateColumns="false" DataKeyNames="DoctorId" > |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="DoctorId" DataField="DoctorId" UniqueName="DoctorId" Visible="false" /> |
| <telerik:GridBoundColumn HeaderText="Name" DataField="DoctorName" UniqueName="Name" /> |
| <telerik:GridBoundColumn HeaderText="Category" DataField="Category" UniqueName="Category" /> |
| <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" /> |
| </Columns> |
| <EditFormSettings EditFormType="Template"> |
| <FormTemplate> |
| <table> |
| <tr> |
| <td><h3>Doctor Details:</h3></td> |
| </tr> |
| <tr> |
| <td>Name:</td> |
| <td><asp:TextBox ID="txtDoctorname" runat="server" Text = '<%# Eval("DoctorName") %>'></asp:TextBox></td> |
| <td>Category:</td> |
| <td> |
| <asp:DropDownList ID="drpCategory" runat="server"> |
| <asp:ListItem Text="Physician" Value="23" Selected="True"></asp:ListItem> |
| <asp:ListItem Text="Dentist" Value="14"></asp:ListItem> |
| <asp:ListItem Text="Alt Medicine" Value="22"></asp:ListItem> |
| </asp:DropDownList> |
| </td> |
| <td>Profile type:</td> |
| <td> |
| <asp:DropDownList ID="drpProfile" runat="server"> |
| </asp:DropDownList> |
| </td> |
| </tr> |
| </table> |
| </FormTemplate> |
| </EditFormSettings> |
| </MasterTableView> |
| </telerik:RadGrid> |
