ag-grid-ng2

ag-grid and angular, how to switch grid options dynamically

99封情书 提交于 2019-12-04 05:20:03
问题 I have two different grid configurations (represented as two gridOption objects). One is loading local data, where the other one is using an elasticsearch datasource with the infinite row model. If I wire them in the template [gridOptions]="localOptions" , [gridOptions]="elasticGridOptions" both work perfectly well. This is my current component and (schematically) what I want to achieve: @Component({ selector: 'app-gridtest', styleUrls: ['./gridtest.component.css'], template: ` <ag-grid

Ag-grid Angular How to get click events on Header?

本秂侑毒 提交于 2019-12-04 04:06:59
问题 Is there any way to get notified of click events on ag-grid's header in Angular? The <ag-grid-angular> -Component offers multiple events for clicks on cells (e.g. cellDoubleClicked ). Those don't get triggered for header clicks and I was unable to find any events specific for header clicks. This question was already asked by someone else in the past and not answered, so I don't think, there's any built in way. Why do I need this? I'm working with another library to supply context menus for

Ag grid Server side pagination

一个人想着一个人 提交于 2019-12-03 20:52:31
I'm trying to implement a server side pagination in ag-Grid where I'll make a SOAP call each time I click on the next/previous button. I have already implemented the function with the specific page number so I can retrieve my row data and pass it to the Grid. Any good examples on how to do that? Thanks in advance. After digging ag-grid Library for the whole day , I finally found the solution. First Lets include the following options in our GridOptions; GridOptions : gridOptions: GridOptions = { pagination: true, rowModelType: 'infinite', cacheBlockSize: 20, // you can have your custom page

ag-grid and angular, how to switch grid options dynamically

点点圈 提交于 2019-12-02 07:24:57
I have two different grid configurations (represented as two gridOption objects). One is loading local data, where the other one is using an elasticsearch datasource with the infinite row model. If I wire them in the template [gridOptions]="localOptions" , [gridOptions]="elasticGridOptions" both work perfectly well. This is my current component and (schematically) what I want to achieve: @Component({ selector: 'app-gridtest', styleUrls: ['./gridtest.component.css'], template: ` <ag-grid-angular id="grid" style="width: 100vw;" [style.height] = 'height' class="ag-theme-balham ag-grid"

How to disable selection of cells in ag-grid?

六月ゝ 毕业季﹏ 提交于 2019-11-30 18:52:29
I have a simple ag-grid in an Angular project and want to disable selection of cells in one of its columns. Simply removing the default blue outline during selection would also be fine. I just want no visual change to the cell when the user clicks inside it. How can I do this? I see that ColDef has a property suppressNavigable that sort of helps, since it disallows using the tab key to select the cells, but it still allows selection by clicking. Also, the grid itself seems to offer suppressCellSelection but it doesn't seem granular enough and doesn't seem to affect anything anyway. So, how can

How to disable selection of cells in ag-grid?

こ雲淡風輕ζ 提交于 2019-11-30 01:50:13
问题 I have a simple ag-grid in an Angular project and want to disable selection of cells in one of its columns. Simply removing the default blue outline during selection would also be fine. I just want no visual change to the cell when the user clicks inside it. How can I do this? I see that ColDef has a property suppressNavigable that sort of helps, since it disallows using the tab key to select the cells, but it still allows selection by clicking. Also, the grid itself seems to offer