How to get onColumnHeaderClicked event in aggrid component #3801
Replies: 2 comments 1 reply
-
Plz provide a minimal reproduce example. |
Beta Was this translation helpful? Give feedback.
0 replies
-
from nicegui import ui
ui.aggrid({
'columnDefs': [
{'headerName': 'Name', 'field': 'name'},
{'headerName': 'Age', 'field': 'age'},
],
'rowData': [
{'name': 'Alice', 'age': 18},
{'name': 'Bob', 'age': 21},
{'name': 'Carol', 'age': 42},
],
}).on('ColumnHeaderClicked', lambda event: ui.notify(f'ColId: {event.args['colId']}'))
ui.run() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
falkoschindler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I call the click event through ui.aggrid().on('CellClicked'), and it works well, I get the event object. But when I use .on('onColumnHeaderClicked'), things go wrong, and nothing happens when I click the ag-Grid header. Did I get the name wrong, or does NiceGUI not support listening to the ColumnHeaderClicked event? Thx to all.
Beta Was this translation helpful? Give feedback.
All reactions