From d292715592331fbe50464c683f69b5e5680f3ddf Mon Sep 17 00:00:00 2001
From: mihaela-lukanova Odata 4 with WebAPI
+Odata 4 with WebAPI
diff --git a/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/ODataWebApiWrappers/Views/Home/Index.cshtml b/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/ODataWebApiWrappers/Views/Home/Index.cshtml
index 58fed80d1..81033a611 100644
--- a/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/ODataWebApiWrappers/Views/Home/Index.cshtml
+++ b/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/ODataWebApiWrappers/Views/Home/Index.cshtml
@@ -11,13 +11,13 @@
columns.Bound(e => e.UnitPrice).Width(300);
columns.Bound(e => e.UnitsOnOrder).Width(300);
columns.Bound(e => e.Discontinued).Width(200);
- columns.Command(cmd => cmd.Edit()).Width(300);
+ columns.Command(cmd => cmd.Destroy()).Width(300);
})
.Scrollable()
.ToolBar(tb => {
tb.Create();
tb.Save();
- })
+ })
.DataSource(dataSource => dataSource
.Custom()
.Batch(true)
@@ -38,7 +38,6 @@
t.Destroy(new { url = new Kendo.Mvc.ClientHandlerDescriptor() { HandlerName = "destroyProduct" } });
t.Batch(new { url = new Kendo.Mvc.ClientHandlerDescriptor() { HandlerName = "batchProduct" } });
})
- .Events(ev => ev.RequestEnd("onRequestEnd"))
.PageSize(20)
.ServerPaging(true)
.ServerSorting(true)
@@ -62,11 +61,12 @@
.Scrollable()
.ToolBar(tb =>
{
- tb.Create();
- tb.Save();
+ tb.Create();
+ tb.Save();
})
.DataSource(dataSource => dataSource
.Custom()
+ .Type("odata-v4")
.Batch(true)
.Schema(sch =>
{
@@ -75,11 +75,6 @@
m.Field("BirthDate", typeof(DateTime));
});
})
- .Type("odata-v4")
- .Transport(transport => {
- transport.Read(read => read.Url("https://demos.telerik.com/kendo-ui/service-v4/odata/Employees"));
- }
- )
.Transport(t =>
{
t.Read(new { url = new Kendo.Mvc.ClientHandlerDescriptor() { HandlerName = "readEmployee" } });
@@ -88,7 +83,6 @@
t.Destroy(new { url = new Kendo.Mvc.ClientHandlerDescriptor() { HandlerName = "destroyEmployee" } });
t.Batch(new { url = new Kendo.Mvc.ClientHandlerDescriptor() { HandlerName = "batchEmployee" } });
})
- .Events(ev => ev.RequestEnd("onRequestEnd"))
.PageSize(20)
.ServerPaging(true)
.ServerSorting(true)
@@ -101,51 +95,45 @@
)
\ No newline at end of file
diff --git a/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/SchedulerSignalRLocalHub/Views/Home/Index.cshtml b/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/SchedulerSignalRLocalHub/Views/Home/Index.cshtml
index 4773ccda3..f01b6f39e 100644
--- a/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/SchedulerSignalRLocalHub/Views/Home/Index.cshtml
+++ b/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/SchedulerSignalRLocalHub/Views/Home/Index.cshtml
@@ -1,12 +1,18 @@
-
+
-
@(Html.Kendo().Notification()
.Name("notification")
.Width("100%")
@@ -116,11 +127,10 @@
)
@@ -211,7 +229,7 @@
To see the real-time updates: