adam
Posts: 7
Joined: Wed Dec 25, 2024 4:03 am

Update Datagrid Column

Hi
I have a datagrid component in dashboard with config like this
dataGridOptions: {
dataTable: {
columns: {
headerName:[]
}}}

How do i add update by remove or add new column to table(in case i have button, when click then update)
User avatar
dawid.d
Site Moderator
Posts: 1222
Joined: Thu Oct 06, 2022 11:31 am

Re: Update Datagrid Column

Hi,

Thanks for the question and welcome to our forum!

To address your question about dynamically adding or removing columns in your DataGrid component, here are some approaches:

1. If you’re using `dataTable` defined directly within the DataGrid options, you can update the component, like here: https://jsfiddle.net/BlackLabel/dx0p8g2m/

2. If `dataTable` is defined outside of the DataGrid but loaded directly in its options, you can achieve this with an approach like this: https://jsfiddle.net/BlackLabel/y05bdst8/

3. Keep in mind that you can also load data from a `dataPool`, which might offer additional flexibility depending on your use case.

Let me know if you need further clarification or help implementing this!

Best regards,
Dawid Draguła
Highcharts Developer
adam
Posts: 7
Joined: Wed Dec 25, 2024 4:03 am

Re: Update Datagrid Column

Thanks,

Please reply my other question here:

viewtopic.php?t=53215

Return to “Highcharts Dashboards”