TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
albert albert
NA
524
0
how to expand menu
Apr 8 2013 5:43 AM
Hi everybody,
I have this:
[code]
@using LeaveDays4.Controllers
@(Html.Kendo().TreeView()
.Name("menuTreeView")
.HtmlAttributes(new { tabindex = "99", accesskey = "w" })
.Items(tree =>
{
tree.Add().Text(Resources.Home).Action<HomeController>(act => act.Index());
tree.Add().Text(Resources.Menu_Leave).HtmlAttributes(new { @class = "level-1" }).Expanded(true)
.Items(leave =>
{
leave.Add().Text(Resources.Request_New).Action("RequestLeave", "Employee");
leave.Add().Text(Resources.Balance_Title).Action("Balance", "Employee");
leave.Add().Text(Resources.OutstandingRequests_Title).Action("OutstandingRequests", "Employee");
leave.Add().Text(Resources.LeaveCalendar_Title).Action("LeaveCalendar", "Employee");
});
tree.Add().Text(Resources.Menu_RequestsToBeAssessed).HtmlAttributes(new { @class = "level-1" }).Expanded(true)
.Items(leave =>
{
leave.Add().Text(Resources.Manager_Approval).Action("Approval", "Manager");
leave.Add().Text(Resources.ReportLeaveBalance).Action("ReportLeaveBalance", "Manager");
});
tree.Add().Text(Resources.Menu_OwnData).HtmlAttributes(new { @class = "level-1" }).Expanded(true)
.Items(leave =>
{
leave.Add().Text(Resources.User_Profile).Action<ProfileController>(act => act.Index());
leave.Add().Text(Resources.User_ChangePassword).Action<AccountController>(act => act.Manage((AccountController.ManageMessageId?) null));
});
tree.Add().Text(Resources.Menu_Administration).HtmlAttributes(new { @class = "level-1" }).Expanded(true)
.Items(leave =>
{
leave.Add().Text(Resources.Administration_Employees).Action<AdministrationController>(act => act.Employees());
leave.Add().Text(Resources.Administration_Reports).HtmlAttributes(new { @class = "level-2" })
.Items(sub => sub.Add().Text(Resources.ReportLeaveBalance).Action<AdministrationController>(act => act.ReportLeaveBalance()));
leave.Add().Text(Resources.Administration_Import).HtmlAttributes(new { @class = "level-2" })
.Items(sub =>
{
sub.Add().Text(Resources.Administration_ImportEmployee).Action<AdministrationController>(act => act.ImportEmployee());
sub.Add().Text(Resources.Administration_ImportBankHoliday).Action<AdministrationController>(act => act.ImportBankHoliday());
});
leave.Add().Text(Resources.Administration_Export).HtmlAttributes(new { @class = "level-2" })
.Items(sub => sub.Add().Text(Resources.Administration_ExportTransactions).Action<AdministrationController>(act => act.ExportLeaveEvents()));
leave.Add().Text(Resources.Administration_Users).Action<AdministrationController>(act => act.Users());
});
tree.Add().Text(Resources.Menu_MasterData).HtmlAttributes(new { @class = "level-1" }).Expanded(true)
.Items(sub =>
{
sub.Add().Text(Resources.WorkSchedules_Title).Action<AdministrationController>(act => act.WeekSchedules()).Expanded(true);
sub.Add().Text(Resources.BankHoliday_Title).Action<AdministrationController>(act => act.BankHolidays());
sub.Add().Text(Resources.Department_Title).Action<AdministrationController>(act => act.Departments());
});
tree.Add().Text(Resources.Menu_SystemSettings).HtmlAttributes(new { @class = "level-1" }).Expanded(true)
.Items(sub =>
{
sub.Add().Text(Resources.Setting_Title).Action<AdministrationController>(act => act.Settings());
sub.Add().Text(Resources.Administration_LicenseInfo).Action<AdministrationController>(act => act.LicenseInfo());
}
);
tree.Add().Text(Resources.Menu_SystemAdministrator).HtmlAttributes(new { @class = "level-1" }).Expanded(true)
.Items(sub =>
{
sub.Add().Text(Resources.UploadBanners_Title).Action<SystemAdministratorController>(act => act.UploadBanners());
sub.Add().Text(Resources.SystemAdministrator_SettingsSMTP).Action<SystemAdministratorController>(act => act.SettingsSMPT());
sub.Add().Text(Resources.SystemAdministrator_ResetPasswordForAllOwners).Action<SystemAdministratorController>(act => act.ResetPasswordForAllOwners());
sub.Add().Text(Resources.SystemAdministrator_LeaveConfig).Action<SystemAdministratorController>(act => act.LeaveConfig());
});
}
)
)
[/code]
But you have to click twice if you want to collapse the menu and not once - what it has to be. And The menus have to bee collapsed if you first see the site.
THX for helping.
Reply
Answers (
1
)
Need solution on listbox control..
asp.net