Page 1 of 1

Rendering a grid cell as an hyperlink

PostPosted: Wed Apr 29, 2020 9:25 pm
by nobrega
Hi,

Is there any standard way or rendering de cells of a particular column on a grid as Hyperlinks? Usually we see cell editors being set to change the way a cell is rendered but we see no editor to do this.

Regards,
nobrega

Re: Rendering a grid cell as an hyperlink

PostPosted: Thu Apr 30, 2020 11:08 am
by Support@SIB
We don't have a specific Hyperlink renderer. This has different reasons. But anyway, it's super easy to solve.

We usually configure cell renderers to show links (underlined font) in Desktop environment, or we use an additional cell image and handle click events on the table... This is user-friendly and we didn't have any problems with this solution.

In web environment (vaadin UI), we set styles, e.g.

Syntax: [ Download ] [ Hide ]
Style.addStyleNames(table, "dashtable", "topduration");

table.eventMouseClicked().addListener(this, "doShowStatementDetails");

And a stylesheet:

Syntax: [ Download ] [ Hide ]
.jvx .dashtable.topduration .c-statement_short .v-table-cell-wrapper:hover
{
    text-decoration: underline;
    color: #346b84 !important;
    cursor: pointer;
}

The .c-statement_short is the column style. With this simple mechanism it's super easy to show a hyperlink in web environment.