headerCheckboxSelection Server Side?

Forum to discuss the new web client version of Servoy.

headerCheckboxSelection Server Side?

Postby john1598360627 » Fri Apr 22, 2022 1:46 am

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.

Code: Select all
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
john1598360627
 
Posts: 169
Joined: Tue Aug 25, 2020 3:03 pm

Re: headerCheckboxSelection Server Side?

Postby john1598360627 » Fri Apr 29, 2022 1:15 am

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?
john1598360627
 
Posts: 169
Joined: Tue Aug 25, 2020 3:03 pm

Re: headerCheckboxSelection Server Side?

Postby Gabi Boros » Fri Apr 29, 2022 11:09 am

'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
Servoy
Gabi Boros
 
Posts: 399
Joined: Tue Jun 26, 2007 4:03 pm
Location: Timisoara, Romania

Re: headerCheckboxSelection Server Side?

Postby john1598360627 » Sat Apr 30, 2022 12:52 am

Gabi Boros wrote:'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!
john1598360627
 
Posts: 169
Joined: Tue Aug 25, 2020 3:03 pm

Re: headerCheckboxSelection Server Side?

Postby steve1376656734 » Wed May 11, 2022 12:38 pm

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
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: headerCheckboxSelection Server Side?

Postby john1598360627 » Sat May 14, 2022 3:07 am

steve1376656734 wrote: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?
john1598360627
 
Posts: 169
Joined: Tue Aug 25, 2020 3:03 pm

Re: headerCheckboxSelection Server Side?

Postby steve1376656734 » Sat May 14, 2022 3:04 pm

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
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: headerCheckboxSelection Server Side?

Postby mboegem » Sat May 14, 2022 3:39 pm

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.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 8 guests