This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

Rendering a grid cell as an hyperlink

General questions regarding the development with JVx.

Rendering a grid cell as an hyperlink

Postby nobrega » Wed Apr 29, 2020 9:25 pm

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
nobrega
 
Posts: 19
Joined: Tue Feb 11, 2020 6:40 pm

Re: Rendering a grid cell as an hyperlink

Postby Support@SIB » Thu Apr 30, 2020 11:08 am

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.
User avatar
Support@SIB
 
Posts: 353
Joined: Mon Sep 28, 2009 1:56 pm


Return to Development