Showing posts with the label AngularJS

Using Ng-grid in AngularJS Pages

It is a common requirement for any project to display data in a tabular format. The easiest way to do this is by using HTML tables, but soon this gets complex, you need a way to support sorting (single & multi columns), resizable columns, inline editing, filtering, pagination (client-side and server-side) and so on. There is a way to bind data to a HTML Table in AngularJs, but when it comes to sorting, paging, editing and dragging the columns, the grid choice is useful. ng-grid is Angular's native implementation of the Grid. There are many plugins from third-parties that can be integrated into AngularJS Pages, but ng-grid exists inside the AngularJs framework and is very rich in functionality and compatibility. Let us create a sample ng-grid and understand how ng-grid works. To use AngularJS, you have to include it in your page before the closing <body> tag. Google's CDN is recommended for a faster load time: <script src = "https://ajax.googleapis