Grid/table with only row selection and keypress handling

Questions and answers for designing and implementing forms in Servoy

Grid/table with only row selection and keypress handling

Postby heindricke » Sun Jan 31, 2016 2:36 pm

I need for smart client data grid/table with this features:
  • readonly cells, clicking on any cell cause selection of row only (not cell). Text color stay black, not silver (problem with readOnly prop).
  • whole grid/table force event of keypress, especially enter key (cannot connect keypress plugin to grid, because grid is not element in Servoy elements).
Do you know any plugin, bean?
heindricke
 
Posts: 10
Joined: Fri Jan 22, 2016 7:16 pm

Re: Grid/table with only row selection and keypress handling

Postby Peter de Groot » Mon Feb 01, 2016 10:27 am

Hi,

readonly cells, clicking on any cell cause selection of row only (not cell). Text color stay black, not silver (problem with readOnly prop).


For that you could use labels, and use a style-sheet for color ect.
2016-02-01_0924.png
2016-02-01_0924.png (23.09 KiB) Viewed 3177 times


Regards
User avatar
Peter de Groot
 
Posts: 215
Joined: Thu Jan 10, 2008 8:38 pm
Location: Not sure...

Re: Grid/table with only row selection and keypress handling

Postby heindricke » Mon Feb 01, 2016 11:41 am

Peter de Groot wrote:For that you could use labels, and use a style-sheet for color ect.

It looks very close to solution, but there is problem with plugins.keyListeners.

First press of "enter" key select cell and just second force keyPressed. I need to force keyPress on first pressing.
Code: Select all
plugins.keyListeners.addKeyListener(elements.customer_id, keypress, "keyPressed");
heindricke
 
Posts: 10
Joined: Fri Jan 22, 2016 7:16 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 3 guests