Canonical way of clearing the content of a cell? [message #1805296] |
Thu, 11 April 2019 06:46  |
Eclipse User |
|
|
|
Hi,
I'm in the following situation. I want to remove a cells content when I press delete. The cell is in SELECTED-mode, editable and also has validation added via configuration attributes.
My take on this was as follows. I've registered a UI-Binding for the DEL-Key and the action executed checked if the selected cell is editable, fetches the validator, checks if the specific "empty-value" is valid and fires an UpdateDataCommand with this value.
To me this feels a bit cumbersome, and I'm not sure if there is a canonical way to do this stuff, so I'm looking for more info.
Thanks in advance.
|
|
|
|
|
|
Re: Canonical way of clearing the content of a cell? [message #1805316 is a reply to message #1805311] |
Thu, 11 April 2019 10:13  |
Eclipse User |
|
|
|
Yeah, you were right I actually did not need the validation, but instead of only setting "null" I needed to set some sensible default values to a few colums, because they don't have the notion of an empty value, the empty value is some default value.
Nevertheless the code looks cleaner and follows more the natTable-style. So, thanks for your time. :)
|
|
|
Powered by
FUDForum. Page generated in 0.03772 seconds