headerCheckboxSelection Server Side?

I added the column definition of ‘headerCheckboxSelection’ to an NG Grid column. This enables a checkbox that lets you select all the records filtered within the foundset.

However, I encountered this error message.

WARN org.sablo.BrowserConsole - headerCheckboxSelection is not supported for Server Side Row Model

I’m not sure what this means. Is it because the NG client is server-side? Is there no way of implementing a header checkbox?

https://www.ag-grid.com/javascript-data … -selection

If headerCheckboxSelection isn’t available within Servoy at this time, is there anyway of doing a ‘onHeader’ click event from the grid? Such that I can re-invent the headerCheckboxSelection behavior with it.

There is a ‘onFooterClick’ event for the grid so, is there one for Header?

‘headerCheckboxSelection is not supported for Server Side Row Model’ because in this mode, that is used in Data grid,
not all rows are loaded/displayed in the component at once, they are loaded in ‘chunks’ of rows, and so, a ‘select all’ in the header make no sense - as not all rows are displayed.
The Data grid (ag grid) does not directly supports header click events, as they are ‘reserved’ to sorting - so if you really want to add some code for header clicks, you need to use the onSort callback.
But, if you want to have a ‘select all’ in the header, I suspect you have a grid where you want to load a ‘limited’ number of rows, as you want to displayed them all at once, so maybe a better fit would be the Power grid, that uses a Client Side Row Model, and so it also supports ‘headerCheckboxSelection’

Gabi Boros:
‘headerCheckboxSelection is not supported for Server Side Row Model’ because in this mode, that is used in Data grid,
not all rows are loaded/displayed in the component at once, they are loaded in ‘chunks’ of rows, and so, a ‘select all’ in the header make no sense - as not all rows are displayed.
The Data grid (ag grid) does not directly supports header click events, as they are ‘reserved’ to sorting - so if you really want to add some code for header clicks, you need to use the onSort callback.
But, if you want to have a ‘select all’ in the header, I suspect you have a grid where you want to load a ‘limited’ number of rows, as you want to displayed them all at once, so maybe a better fit would be the Power grid, that uses a Client Side Row Model, and so it also supports ‘headerCheckboxSelection’

Ohhh I see. Data grid loading in chunks, while Power grid loads everything.

I haven’t used the Power grid before so I don’t know how to convert the foundset into the dataset so the Power grid can grab the data. I’ll need to figure that out and try it out. Thanks!

Hi,

Converting the foundset to a dataset is as simple as calling databaseManager.convertToDataSet(foundset).

You can give a second, optional argument that is an array of data provider names if you only want to include some of the DB fields in the conversion.

Hope this helps
Steve

steve1376656734:
Hi,

Converting the foundset to a dataset is as simple as calling databaseManager.convertToDataSet(foundset).

You can give a second, optional argument that is an array of data provider names if you only want to include some of the DB fields in the conversion.

Hope this helps
Steve

Hmmm. But, after the conversion how does the grid update the data? I’m probably misunderstanding, but I thought the idea was that since you’re converting it from Server to Client, the dataset is static.

Is there a way of still updating the dataset whenever there’s a change to the database?

Unfortunately you need to refresh the grid manually whenever the data changes. It’s meant for manipulating a set of data that is predetermined, you can refresh it but only manually.

Steve

Hi John,

what is the usecase?

So far the messages have been about something you want, but isn’t possible.
In order to think about a solution for your problem, it would be nice to know what context this is in.

Maybe screenshot, what is the possible foundset size, etc. etc.