NG Grid Column Button & Multi-Selector Ctrl

Forum to discuss the new web client version of Servoy.

NG Grid Column Button & Multi-Selector Ctrl

Postby john1598360627 » Tue Nov 23, 2021 8:43 pm

I got two questions;


Let's say there's a blank column in the NG Grid. The user selects a record. That blank row then shows a button in the blank column.

Is there any way of doing that? Showing a button for a selected record from within the grid itself?

The normal behavior of the multi-selector is;
  • Click: Selects one record
  • Ctrl + Click: Adds another selection of a record
  • Shift + Click: Adds multiple sections of records in a row

I want to change the behavior so that Click works just like Ctrl + Click. Is this possible?
Posts: 28
Joined: Tue Aug 25, 2020 3:03 pm

Re: NG Grid Column Button & Multi-Selector Ctrl

Postby swingman » Wed Nov 24, 2021 9:50 am

Hi John,

the following in an outline of what I would try, but I have not checked the actual class names so you need to look them up.


I would add a calculated column in the table the grid is based which calculates to 'hidden_button' if you don't want to show the button. You do this in the table under the database node, maybe second or third tab.
Apply it (the name of the calculated column) to the button using the style_provider (column to be used as a CSS class) of the grid cell in the properties inspector in the Servoy Developer.

Your grid will have a class like "row_selected" or whatever which marks the selected row. Check the documentation or with the web inspector in your browser to find the exact name.

By default the button is hidden so I would use a class in my CSS. Something like
.hidden_button {
visible: false;
.hidden_button .row_selected {
visible: true;

in your CSS (found under the Media node).


The grids have multi select behaviour built in -- there is a checkbox somewhere to enable this in the properties inspector, and but you should be able to override by attaching methods to the various events that you can see.
I have never tried overriding myself.

Hope this helps,
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK - The world's most advanced open source database.
User avatar
Posts: 1377
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 3 guests