Generic UI Angular Grid API

Grid API

The grid library provides an api to make to grid components. It also allows to retrieve data handled by the grid.

import { GuiGridComponent, GuiGridApi } from '@generic-ui/ngx-grid';

@Component({
	template: `
	<gui-grid ...></gui-grid>
	`
})
class ExampleComponent {
	
	@ViewChild(GuiGridComponent, { static: true })
	gridComponent: GuiGridComponent;
	
	ngOnInit() {
		const api: GuiGridApi = this.gridComponent.api;

		api.selectAll();
	}
}

Modifications

NameDescription
deleteRow(row: GuiSelectedRow): voidDeletes row
deleteRows(rows: Array<GuiSelectedRow>): voidDeletes an array of rows
getSelectedRows(): Array<GuiSelectedRow>Returns an array of selected rows.

Selection

NameDescription
selectAll(): voidSelects all rows
unselectAll(): voidUnselects all rows

Related articles:

We use cookies to improve your experience. If you continue browsing, we assume that you consent to our use of cookies.