or
m => m.UiColor
@(Html.Kendo().Chart<WorkItemStatusSummary>()
.Name(
"Chart"
)
.Legend(legend => legend
.Visible(
true
)
.Position(ChartLegendPosition.Bottom))
.DataSource(ds => ds
.Read(read => read
.Action(
"DummyAction"
,
"DummyController"
)
.Data(
"ChartAdditionalFilterData"
))
//.Group(g => g.Add(m => m.Status))
)
.Series(series => series.Column(m => m.Count, m => m.UiColor).Name(
""
))
.CategoryAxis(axis => axis
.Categories(m => m.Status)
)
)
I've ended up using option 3 as it seems to work best with the intention of how the MV4C bundling should work (non-minified used in debug so can debug into kendo code, and then minified version used in release).
I'm mainly posting to help anyone else who hits this problem, but if anyone has any suggestion why option 3 is not a good option I'd like to hear.
Also Kendo should probably update the documentation as the current IgnoreList approach no longer works.
001.
@(Html.Kendo().Menu()
002.
.HighlightPath(true)
003.
.Name("Menu")
004.
.Items(items =>
005.
{
006.
items.Add()
007.
.Text("Home")
008.
.Items(children =>
009.
{
010.
children.Add().Text("Website Home");
011.
children.Add().Text("Application Home").Action("Index", "Home");
012.
});
013.
014.
items.Add()
015.
.Text("Company")
016.
.Items(children =>
017.
{
018.
children.Add().Text("Events")
019.
.Items(innerChildren =>
020.
{
021.
innerChildren.Add().Text("List");
022.
//.Action("Index", "CompanyEvents");
023.
innerChildren.Add().Text("Calendar View");
024.
//.Action("Calendar", "CompanyEvents");
025.
});
026.
027.
children.Add().Text("Departments");
028.
//.Action("Index", "Department");
029.
030.
031.
children.Add().Text("Configure")
032.
.Items(innerChildren =>
033.
{
034.
innerChildren.Add().Text("Benefit Year");
035.
//.Action("Index", "BenefitYear");
036.
innerChildren.Add().Text("Employee Types").Action("Index", "EmployeeType");
037.
innerChildren.Add().Text("Holidays").Action("Index", "Holiday");
038.
innerChildren.Add().Text("Job Codes").Action("Index", "JobCode");
039.
innerChildren.Add().Text("PTO Request Status Codes").Action("Index", "RequestStatusCode");
040.
innerChildren.Add().Text("PTO Acrual").Action("Index", "PTOAcrual");
041.
});
042.
043.
});
044.
045.
items.Add()
046.
.Text("Employee")
047.
.Items(children =>
048.
{
049.
children.Add().Text("Employee Search");
050.
//.Action("Index", "Employee");
051.
children.Add().Text("Employee Grid");
052.
//.Action("IndexGrid", "Employee");
053.
054.
children.Add().Text("PTO Request")
055.
.Items(innerChildren =>
056.
{
057.
innerChildren.Add().Text("List").Action("Index", "PTORequest");
058.
innerChildren.Add().Text("New PTO Request").Action("Create", "PTORequest");
059.
});
060.
061.
children.Add().Text("Edit Personal Data").Action("Edit", "Employee", new { id = EmpId });
062.
children.Add().Text("Employee Profile")
063.
.Items(innerChildren =>
064.
{
065.
innerChildren.Add().Text("List").Action("Index", "EmployeeProfile");
066.
//innerChildren.Add().Text("Edit my Profile").Action("Edit", "EmployeeProfile", new { id = EmpProfileId });
067.
innerChildren.Add().Text("Edit my Profile").Action("Edit", "EmployeeProfile");
068.
});
069.
070.
children.Add().Text("Sanction")
071.
.Items(innerChildren =>
072.
{
073.
innerChildren.Add().Text("List").Action("Index", "Sanction");
074.
innerChildren.Add().Text("New Sanction").Action("Create", "Sanction");
075.
});
076.
077.
children.Add().Text("Attendance Log")
078.
.Items(innerChildren =>
079.
{
080.
innerChildren.Add().Text("List").Action("Index", "AttendanceLog");
081.
innerChildren.Add().Text("New Attendance Log").Action("Create", "AttendanceLog");
082.
});
083.
084.
children.Add().Text("Timesheet")
085.
.Items(innerChildren =>
086.
{
087.
innerChildren.Add().Text("List").Action("Index", "TimeSheet");
088.
innerChildren.Add().Text("List (Grid)").Action("IndexGrid", "TimeSheet");
089.
innerChildren.Add().Text("New Timesheet").Action("Create", "Timesheet");
090.
});
091.
092.
});
093.
094.
095.
items.Add()
096.
.Text("Admin").HtmlAttributes(new { id="admin"})
097.
.Items(children =>
098.
{
099.
children.Add().Text("Company").Action("Index", "Company");
100.
children.Add().Text("Subscription Level").Action("Index", "SubscriptionLevel");
101.
children.Add().Text("Subscription Limits").Action("Index", "SubscriptionLimit");
102.
children.Add().Text("PTO Pool Type").Action("Index", "PTOPoolType");
103.
children.Add().Text("Absence Code").Action("Index", "AbscenceCode");
104.
children.Add().Text("Timesheet Status Codes").Action("Index", "TimesheetStatusCode");
105.
children.Add().Text("Activity Log").Action("Index", "ActivityLog");
106.
children.Add().Text("Release History").Action("Index", "ReleaseHistory");
107.
children.Add().Text("Report List").Action("Index", "Report");
108.
children.Add().Text("Suggestion List").Action("Index", "UserSuggestion");
109.
children.Add().Text("Create Employee w/o User").Action("Create", "Employee");
110.
}).Enabled(false);
111.
112.
//items.Add().Text("About");
113.
//items.Add().Text("Contact");
114.
})
115.
)
function SetItemGridView(isManual) {
var itemGrid = $("#ItemGrid").data("kendoGrid");
if (isManual) {
itemGrid.showColumn("MyTestCol");
} else {
itemGrid.hideColumn("MyTestCol");
}
}
function ConfigureItemGrid(e) {
SetItemGridView($("#IsManual").length > 0 ? $("#IsManual").is(":checked") : true);
}
@(Html.Kendo().Grid(Model)
.Name("ItemGrid")
.Columns(columns =>
{
columns.Bound(i => i.MyTestCol).Width(100);
columns.Command(command =>
{
command.Destroy();
}).Width(60);
})
.Events(e =>
{
e.DataBound("ConfigureItemGrid");
e.Edit("onItemGridEdit");
})
.ToolBar(toolbar =>
{
toolbar.Create();
})
.Editable(editable =>
{
editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Bottom);
})
.Navigatable(navigatable => navigatable.Enabled(true))
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.ServerOperation(false)
.Model(model =>
{
model.Id(i => i.ItemModelID);
})
.Create(create => create.Action("CreateProducts", "ItemGrid"))
.Read(read => read.Action("GetProducts", "ItemGrid"))
.Update(update => update.Action("UpdateProducts", "ItemGrid"))
.Destroy(destroy => destroy.Action("DeleteProducts", "ItemGrid"))
)
)
public
JsonResult JsonIndex()
{
var menus = _db.GetMenus( 0, 1, 1, 0 );
var allMenus = from m
in
menus
where m.MenuId == 1
select
new
{
Name = m.MenuName,
ImageUrl = m.MenuImageUrl,
NavUrl = m.MenuNavUrl,
hasChildren =
true
,
children = from m2
in
menus
where m2.ParentMenuId == m.MenuId
select
new
{
Name = m2.MenuName,
ImageUrl = m2.MenuImageUrl,
NavUrl = m2.MenuNavUrl,
hasChildren =
false
,
}
};
JsonResult json = Json( allMenus, JsonRequestBehavior.AllowGet );
return
( json );
}
<script>
$(document).ready(
function
() {
function
populateTreeView() {
var
remoteDataSource =
new
kendo.data.HierarchicalDataSource({
type:
"json"
,
transport: {
read:
"Home/JsonIndex"
},
schema: {
model: {
text:
"Name"
,
ImageUrl:
"ImageUrl"
,
expanded:
true
,
children:
"children"
,
hasChildren:
"hasChildren"
,
NavUrl:
"NavUrl"
}
}
});
$(
"#tv"
).kendoTreeView({
id:
"tree123"
,
Name:
"tree123"
,
dataSource: remoteDataSource,
dataTextField:
"Name"
,
dataImageUrlField:
"ImageUrl"
,
select: onTreeViewSelect
});
}
$(document).ready(
function
() {
populateTreeView();
});
});
</script>