Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to style a single Grid using RWT.CUSTOM_VARIANT?
How to style a single Grid using RWT.CUSTOM_VARIANT? [message #1814205] Thu, 05 September 2019 15:16 Go to next message
Linuxhippy Mising name is currently offline Linuxhippy Mising nameFriend
Messages: 71
Registered: July 2009
Member
Hi,

I would like to style a single Grid in our application using different colors (all others should remain unchanged).
I tried already to set RWT.CUSTOM_VARIANT on the Grid itself and add the modes in a custom theme contribution.

However I struggle with GridItems (which would allow me to set different even/odd row colors), as they are generated dynamically by the GridTableViewer / triggered by databinding.
And as far as I can see, GridTableViewer directly calls the GridItem constructor without any possibility to intercept.

Any ideas how I can apply custom per-grid CSS styles to the GridItems of a GridTableViewer anyway?

Thank you in advance and best regards, Clemens

[Updated on: Thu, 05 September 2019 15:17]

Report message to a moderator

Re: How to style a single Grid using RWT.CUSTOM_VARIANT? [message #1814207 is a reply to message #1814205] Thu, 05 September 2019 15:24 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Clemens,

I think that (looked at client-side JS code) setting the CUSTOM_VARIANT on the Grid is enough. If no specific GridItem CUSTOM_VARIANT is set, the one from the Grid (set on root item) is used [1].

[1] https://github.com/eclipse/rap/blob/master/bundles/org.eclipse.rap.rwt/js/rwt/widgets/GridItem.js#L299

Best regards,
Ivan
Re: How to style a single Grid using RWT.CUSTOM_VARIANT? [message #1814232 is a reply to message #1814207] Fri, 06 September 2019 08:53 Go to previous message
Linuxhippy Mising name is currently offline Linuxhippy Mising nameFriend
Messages: 71
Registered: July 2009
Member
Hi Ivan,

Glad to hear this is already implemented in more recent versions of RAP :)
Our application currently is still at 3.1 - however a quick try with 3.9 shows everything is working as expected.

Thanks & best regards, Clemens
Previous Topic:Jface treeviewer refresh not working properly
Next Topic:[ANN] RAP 3.10 is available for download
Goto Forum:
  


Current Time: Tue Apr 16 08:50:01 GMT 2024

Powered by FUDForum. Page generated in 0.49823 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top