|
Rank: Advanced Member Groups: Member
Joined: 10/14/2010 Posts: 19
|
I have a Grid and if a user clicks on a particular cell (I have it defined as static) I need to open a new window.
How do I attached an onclick event to a cell?
|
|
Rank: Advanced Member Groups: Member
Joined: 10/14/2010 Posts: 19
|
I want to clarify one point.
The onclick event that will open an window needs to pass some values. Those values are in hidden columns in the grid. I would prefer to add the onclick event on the server side before the page is rendered. I know I can gain access to the cell but how to attach the onlick so that I can use the hidden values in the grid?
If it can be done on the client if the server side does not support it that would work too.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
|
|
Rank: Advanced Member Groups: Member
Joined: 10/14/2010 Posts: 19
|
When I capture the click event I need to get some of the hidden values from the grid. The doc above talks about one cell. How do I go about getting hidden values?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You can get any cell with our client side API. For example, the following code get the value of the first cell:
Code: JavaScript
//Get the Grid
var grid = eo_GetObject("Grid1");
//Get the first item
var firstItem = grid.getItem(0);
//Get the first cell in the item
var firstCell = firstItem.getCell(0);
//Get the cell value
var value = firstCell.getValue();
You can take a look of this page if you have not used our client side API before: http://doc.essentialobjects.com/library/1/clientapi_howto.aspxThanks!
|
|