This tutorial builds a web API for managing a list of “to-do” items. A user interface (UI) isn’t created. The following diagram shows the basic design of the app. The client is whatever consumes the web API (mobile app, browser,…

ASP.NET Tutorial – Create a Web API with ASP.NET Core and Visual Studio for Windows
ASP.NET CORE 2.2.1 Hosting – Implement Repository Pattern In .NET
The intention of this post is to explain about the Repository pattern and how it’s useful in enterprise applications. Introduction Why use Repository Misconceptions Implementation Conclusion Source Code Introduction The repository pattern is an abstraction layer between your database and…
ASP.NET CORE 2.2.1 Hosting – Kendo UI Grid With Select All Checkbox In Header
In this example, I will create a Kendo UI grid with multiple checkboxes and one checkbox in the header to check all the checkboxes inside the grid. Below is the Angular code to bind the grid.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
function bindGrid() { var filterContain = { cell: { showOperators: false, operator: "contains", suggestionOperator: "contains" } } var DataColumn = [ { title: "<input id='chkAll' class='checkAllCls' type='checkbox'/>", width: "35px", template: "<input type='checkbox' class='check-box-inner' />", filterable: false }, { field: "ID", title: "ID", width: "10%", filterable: filterContain }, { field: "First_Name", title: "First Name", width: "10%", filterable: filterContain }, { field: "Last_Name", title: "Last Name", width: "10%", filterable: filterContain }, { field: "EmailID", title: "Email ID", width: "10%", filterable: filterContain }, { field: "Mobile", title: "Mobile", width: "10%", filterable: filterContain }, ]; $("#grd").kendoGrid({ selectable: "multiple", dataSource: { schema: { model: { fields: { ID: { type: "string" }, First_Name: { type: "string" }, Last_Name: { type: "string" }, EmailID: { type: "string" }, Mobile: { type: "string" }, } } }, pageSize: 100, }, height: 800, filterable: { mode: "row" }, groupable: false, scrollable: true, pageable: true, sortable: true, columns: DataColumn, }); $("#grd tbody").on("click", "tr", function (e) { var rowElement = this; var row = $(rowElement); var grid = $("#grdC").getKendoGrid(); if (row.hasClass("k-state-selected")) { row.removeClass('k-state-selected'); row.find('[type=checkbox]').prop('checked', false); e.stopPropagation(); } else { grid.select(row) row.find('[type=checkbox]').prop('checked', true); e.stopPropagation(); } }); $(".checkAllCls").on("click", function () { var ele = this; var state = $(ele).is(':checked'); var grid = $('#grd').data('kendoGrid'); if (state == true) { $('.check-box-inner').prop('checked', true).closest('tr').addClass('k-state-selected'); } else { $('.check-box-inner').prop('checked', false).closest('tr').removeClass('k-state-selected'); } }); } |
HTML code where you…
ASP.NET CORE 2.2.1 Hosting – Overview Of CLR and Its Major Tasks In .NET
The Runtime Environment of .NET Framework is Called Common Language Runtime. CLR can be considered as Virtual Machine (VM) component of Microsoft’s .NET framework. It manages the execution of Managed Code (.NET Programs). CLR uses a just-in-time (JIT) compiler which converts…

ASP.NET 4.7.1 Hosting – Indexing In-Memory Collections For Blazing Fast Access
The CodexMicroORM open source project on GitHub hosts a few useful .NET goodies that can help you write concise code with great performance. In this article, I’ll cover a collection type that supports multi-property indexing and as such, performs very…
ASP.NET 4.7.1 Hosting – Custom Filter In MVC Or Logging Using MVC Filter
I want to create a filter in MVC project which logs activity of each and every controller action. I am just injecting an object of type ILogger using which I am logging the logs in my Azure table storage. This…

ASP.NET 4.7.1 Hosting – Dynamic Objects And Alternatives To Reflection
The CodexMicroORM open source project on GitHub includes several features to help you create fast, concise .NET deliverables. One such feature is implemented in the Performance.cs file and enables dynamic (i.e. run-time) access to properties of any object – faster…

ASP.NET 4.7.1 Hosting – How To Read Gmail Inbox From Google API?
To Read Gmail Inbox from Google Api (from, date , subject , body of the email). In this section we are going to see about reading Gmail inbox from Google api. Please use your email id for configuration and do…

ASP.NET 4.7.1 Hosting – View Ways To Add Dependency Packages In .NET Core
This would be a very short article on how to add dependencies in .NET Core. Well, there are many ways to achieve this. One is via Visual Studio and another way is through command prompt. Let’s quickly have a look.…
ASP.NET 4.7.1 Hosting – Mapping Similar Objects In ASP.NET Core 2.0
This post is about Automapper. As its name suggests, it will do some sort of mapping. Now, the question is, what sort of mapping? Well, this mapping is all about mapping the properties of two objects with each other. If…