Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin Grid - link in grid rows

sanket p
6 years ago Aug 27, 2015 5:14am
Kim Leppänen
6 years ago Aug 27, 2015 5:32am
sanket p
6 years ago Aug 27, 2015 6:10am
Kim Leppänen
6 years ago Aug 27, 2015 7:28am

That's right, it's a native button and not a Vaadin button - forgot that. Anyway, use CSS to style the button as a link.

button {
   background:none!important;
   border:none;
   padding:0!important;
   font: inherit;
   /*border is optional*/
   border-bottom:1px solid #444;
   cursor: pointer;
}

 

sanket p
6 years ago Aug 28, 2015 3:37am
sanket p
6 years ago Aug 31, 2015 6:50am
Marius Reinwald
6 years ago Sep 14, 2015 1:11pm

A bit of an older one but:
A ButtonRenderer is normally put on a Column of type String. There it will create a Native Button on the client side and use the content of the column as a caption. So in your case you would add a property of type String.class with the content being whatever you want the caption to be e.g. "new link".
Then you add the ButtonRenderer to this column. This will give you buttons with "new link" as their caption.
To make them now look like links use the style Kim provided and use a selector like
.v-grid .v-nativebutton
(not entirely sure if it is correct as i have no example right now)
use a custom style name for the grid if you don't want to change the buttons in all Grids.
 

sanket p
6 years ago Sep 15, 2015 5:28am
Jainish Mistry
4 years ago Apr 12, 2017 11:54am