or
$("#color").kendoDropDownList({ dataTextField: "text", dataValueField: "value", dataSource: [ { text: "Black", value: 1 }, { text: "Orange", value: 2 }, { text: "Grey", value: 3 } ], index: 0, change: onChange});01.@section scripts02.{03.<script>04. $(function () {05. var hubUrl = "/signalr/hubs";06. var connection = $.hubConnection(hubUrl, { useDefaultPath: false });07. var hub = connection.createHubProxy("submissionHub");08. var hubStart = connection.start();09. 10. $("#notification").kendoNotification({11. width: "100%",12. position: {13. top: 0,14. left: 015. }16. });17. $("#grid").kendoGrid({18. editable: true,19. sortable: true,20. dataSource: {21. type: "signalr",22. autoSync: true,23. // Handle the push event to display notifications when push updates arrive24. push: function (e) {25. var popupNotification = $("#popupNotification").data("kendoNotification");26. popupNotification.show(e.type, "success");27. },28. schema: {29. model: {30. id: "SubmissionId",31. fields: {32. "SubmissionId": { editable: false },33. "FirstName": { type: "text" }34. }35. }36. },37. sort: [{ field: "SubmissionId", dir: "desc" }],38. transport: {39. signalr: {40. promise: hubStart,41. hub: hub,42. server: {43. read: "read",44. update: "update",45. destroy: "destroy",46. create: "create"47. },48. client: {49. read: "read",50. update: "update",51. destroy: "destroy",52. create: "create"53. }54. }55. }56. }57. });58. });59. 60. 61.</script> 62.}63. 64.<div id="grid" data-role="grid" style="height: 200px">65.</div>01.using Microsoft.AspNet.SignalR;02.using Test_Project.Models;03. 04.namespace Test_Project.Hubs05.{06. public class SubmissionHub : Hub07. {08. public void Read()09. {10. Clients.All.Read(Database.Submissions.ToArray());11. }12. 13. public void Update(Submission submission)14. {15. Clients.All.Update(submission);16. }17. 18. public void Destroy(Submission submission)19. {20. Clients.All.Destroy(submission);21. }22. 23. public void Create()24. {25. Clients.All.Create(new Submission());26. }27. }28.}