:: Forum >>

How to get single value on click of any cell in the same row

Hi all,

I am struck in between, I would like to know "How to get single value(or last cell value only - say ID) on click of any cell in the same row. Or can we keep something common for complete row. So that anywhere we click on the row, we can get one single value.

Please send the reply to iamini@hotmail.com

Thanks in Advance.
Ameen
Ameenullah
Monday, October 17, 2005
obj.setAction("click", function(src){
alert(myData[src.getItemProperty("index")][0])
});
Monday, October 17, 2005
Thanks a ton... :)
Ameenullah
Monday, October 17, 2005
Hello,
I'm getting an "On page error" when I click on cells. Do I need to do something to the code above to get it to work?
Saturday, November 19, 2005
Nevermind, I got it!
Sunday, November 20, 2005
The setAction event above doesn't work for the Grid of version 2, Plz help
Ritesh Jagga
Wednesday, November 23, 2005
for Beta version 2 how to get onblur event in grid
Imran
Tuesday, December 6, 2005
In the above mentioned code
obj.setAction("click", function(src){
alert(myData[src.getItemProperty("index")][0])
});
What is myData.
Adarsh
Saturday, January 21, 2006
That seems to be the problem, you have to refer back to your original data to get the id value from the selection index. There should be a way to get the actual data so that an entity id can be passed to the server.
Warrell
Tuesday, February 14, 2006
How do I store the information into an object or even send it anyware else, but a message box?
Abe mister
Thursday, March 9, 2006
Hope this helps... i just practiced today.. sorry if not so good.

<html>
<head>
<title>ActiveWidgets Example</title>
<!-- ActiveWidgets stylesheet and scripts -->
<link href="runtime/styles/classic/grid.css" rel="stylesheet" type="text/css" ></link>
<script src="runtime/lib/grid.js"></script>
<style>
* {-moz-box-sizing: border-box;}
html { width: 100%; height: 100%; margin: 0px; padding: 0px; overflow: hidden}
body { width: 100%; height: 100%; margin: 0px; padding: 50px; overflow: hidden; font: menu}
</style>
<script>
window.focus();
</script>
</head>
<body>
<script>

var myCells = [
["MSFT","Microsoft Corporation", "314,571.156", "32,187.000"],
["ORCL", "Oracle Corporation", "62,615.266", "9,519.000"],
["SAP", "SAP AG (ADR)", "40,986.328", "8,296.420"],
["CA", "Computer Associates Inter", "15,606.335", "3,164.000"],
["ERTS", "Electronic Arts Inc.", "14,490.895", "2,503.727"]
];

var obj = new Active.Controls.Grid;

obj.setDataText(function(i,j){return myCells[i][j]});
obj.setColumnCount(4);
obj.setRowCount(5);


obj.setAction("click", function(src)
{
//the [1] is the column... play with it..
alert(myCells[src.getItemProperty("index")][1])
});

document.write(obj);
</script>

</body>
</html>
Aris
Wednesday, May 17, 2006

This topic is archived.


Back to support forum

Forum search