Add Buttons to Single Record in Grid

Forum to discuss the new web client version of Servoy.

Add Buttons to Single Record in Grid

Postby kwpsd » Sat Sep 24, 2022 9:46 pm

Servoy TiNG 2022.09

Our UI/UX designer is asking whether or not it is possible to add buttons to a single record in the grid while the remaining records do not have the buttons. We do not yet have sufficient experience with the grid and were hoping someone else might have explored this type of design. An example screen is attached. Thanks!

grid_single_record_buttons.png
You do not have the required permissions to view the files attached to this post.
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 687
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Re: Add Buttons to Single Record in Grid

Postby swingman » Mon Sep 26, 2022 11:33 am

Hi, you should be able to do this with a rowStyleClassDataprovider.

Add a CSS class, like 'save_and_cancel_button' to your button columns
Create a calculation in your table that returns a CSS tag, like 'hide_save_and_cancel_button' for all the records where you don't the buttons to show.
Then add something like

.hide_save_and_cancel_button .save_and_cancel_button { visible: false }

to your css.

I haven't tested this, so you may need to adjust the above, but at least you have a starting point...
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Add Buttons to Single Record in Grid

Postby kwpsd » Mon Sep 26, 2022 6:40 pm

Hi, Christian.

I hope you are doing well! Thanks for the starting point. We will experiment with rowStyleClassDataprovider to see what happens.
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 687
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 5 guests