@tusharghoshbd/ngx-datagrid
Version:
Angular datagrid component using html
58 lines (40 loc) • 1.49 kB
Markdown
**Ngx Data Grid** is an angular library for presenting data in list. This library is easy to integrate in your angular component. This library supports search, pagination features. You can also customize this library as your requirements

[](https://tusharghoshbd.github.io/ngx-datagrid/)
[](https://stackblitz.com/edit/ngx-datagrid?file=src/app/app.component.ts)
As a prerequisite, you need [boostrap](https://getbootstrap.com/) library.
```ts
npm i @tusharghoshbd/ngx-datagrid
```
```html
<ngx-datagrid
gridClass="list-group-item"
[]="data"
[]="options"
(itemClick)="onItemClick($event)">
<ng-template let-rowDetail
<!-- your code for header-->
</ng-template>
<ng-template let-rowDetail
<!-- your code for body-->
</ng-template>
</ngx-datagrid>
```
```ts
options:any={
itemPerPageDDL : [5, 10, 20, 30], // default
itemClickEvent: true //default, true|false
};
data = []
```
**Note:** When you use button click event in body or header that time itemClickEvent must be false.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
[](https://choosealicense.com/licenses/mit/)