3.0.0

Redirect page dinamically on click in a row...

I see this code for send the text where you click to status bar:
obj.setAction("click", function(src){window.status = src.getItemProperty("text")});


And the question is, how can i retrieve the text of one cell of row that i do click, not the text over you do click? I want that for redirect depending of text of one cell for each row...

Must be seems like this:
obj.setAction("click", function(src){window.location.href = 'http://www.terra.es/?id=' + src.getItemProperty("text")});
Maik
May 5,
First you can assign your custom index to grid, for example if you have you id in column 4:

obj.setDataProperty("index", function(i){return myData[i][4]});


After that you assign the click event and redirect page:

obj.setAction("click", function(src){window.location.href = 'http://www.yourdomain.com/page?id=' + src.getItemProperty("index")});
Darius
May 5,
I've similar problem because I want to reload
the same page every click displaying the same row and the same
scroll position . But if I select the last selected row the scroll doesnt scroll .

example:
number of visible rows 10
A)
obj.setSelectionIndex(8);
i can see the row selected

B)
obj.setSelectionIndex(18);
i cannot see the row selected
the scroller doesnt scroll

I tried this to scroll it :

var index = this.getProperty("selection/index");
var scrollbars = this.getTemplate("layout").getContent("scrollbars");
scrollbars.element().scrollTop = 120 // the scroller position

but I dont know the event to link this action.
Stefano
May 7,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.