Skip to content

How to get onColumnHeaderClicked event in aggrid component #3801

Closed Answered by python-and-fiction
Husky0c asked this question in Q&A
Discussion options

You must be logged in to vote
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()

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Husky0c
Comment options

Answer selected by falkoschindler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants