A datagrid for angular 6 with .net core 2.1. Ongoing project
-
- Repository Patterns and Dependency Injections
- Generics
- Actions, Expressions and other delegates
- Dynamic Linq
-
Preview2.2 branch uses .net core 2.2 preview version. Use this branch only incase you know the risk of using preview version.
-
- Custom Datagrid
- Dynamic Columns and Action Button
- Dynamic Pagination Features
- Dynamic Search Box (One from all or separate Columns for each Textbox)
In this project, other than generic function, there are some codes, written just to show implementation of certain features in C#. There may be better ways to do. But we wrote it to show some of C# advance features. You will not need this to implement datagrid in your project.
Func<string, string, string> FullName =
delegate(string firstName, string lastName)
{
return firstName + " " + lastName;
};
result.Items.ToList().ForEach(p => p.FullName = FullName(p.FirstName, p.LastName));
Open Command prompt and go to project folder, NjGrid
(Make sure that npm and .net core 2.1 is installed).
-
Inside NjGrid Folder. In command prompt type
dotnet restore
-
Inside ClientApp folder inside NjGrid folder, type in command prompt
npm i
-
Again from NjGrid Folder, Type in command prompt,
dotnet build
-
Type
dotnet run
ordotnet watch run
as per your choice or requirements
Though We have tried to implement easy to understand and readable as well as generic functions without compromising with the best coding practise along with standard and efficient codes, there may be sections and areas needed to improve.
You are most welcome to suggest change.