View Full Version : In EXT GWT, how to implement hiperlink in Grid

25 May 2009, 9:35 PM
I have to know about how we make hyperlink on grid rows ...Say for example i have a column "Country" in grid.Its values appear are say "UK","US" etc so my query is how i make hyperlink on "UK" and "US" values, so that when i clicked on UK , its shows it related information.

Please help me out , I'm struggling from long back time but didn't find any suitable solution.

Thanks in advance for valuable suggestion.

26 May 2009, 3:05 PM
On your ColumnConfig object, set a renderer using setRenderer(new MyRenderer).

MyRenderer is a class that implements GridCellRenderer, and returns the HTML.


27 May 2009, 10:36 AM
Ben is correct. I should mention, when he says "returns the HTML" he literally means return the HTML (either as a href or javascript to call on click within an anchor tag)


<a href="http://www.google.com">Google</a>


<a href="javascript:alert('here');">Click me</a>

Conceptually this can feel a little qwerky (you are using a GXT framework to avoid dealing with HTML code right?) but it does work.

I know there is a widget support in 2.0 talked about for Grids, but I have not tried it.

27 May 2009, 11:31 PM


It's working ...:>