AgGrid Interface
- class epyk.interfaces.tables.CompAgGrid.AgGrid(ui)
- table(records: Optional[list] = None, cols: Optional[list] = None, rows: Optional[list] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (300, 'px'), html_code: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None) Table
Create a generic Angular Grid table.
- Tags:
- Categories:
Usage:
import epyk as pk from epyk.mocks import urls as data_urls page = pk.Page() data = page.py.requests.csv(data_urls.AIRPORT_TRAFFIC) table = page.ui.tables.aggrids.table(data) table.options.paginationPageSize = 10 table.options.rowSelection = "single" table = page.ui.tables.aggrids.table(rows=["athlete", "country", "sport", 'year']) table.attr["class"].add("ag-theme-alpine") c = table.get_column("athlete") c.headerCheckboxSelection = True c.headerCheckboxSelectionCurrentPageOnly = True c.checkboxSelection = True c.showDisabledCheckboxes = True table.options.rowSelection = 'multiple' table.options.suppressRowClickSelection = True table.onReady([ page.js.fetch("https://www.ag-grid.com/example-assets/olympic-winners.json").json().process(table.js.setRowData) ])
- Parameters:
records – Optional. The list of dictionaries with the input data.
cols – Optional. The list of key from the record to be used as columns in the table.
rows – Optional. The list of key from the record to be used as rows in the table.
width – Optional. A tuple with the integer for the component width and its unit.
height – Optional. A tuple with the integer for the component height and its unit.
html_code – Optional. An identifier for this component (on both Python and Javascript side).
options – Optional. Specific Python options available for this component.
profile – Optional. A flag to set the component performance storage.