3.2.0

Get the cell value?

how can i get the value of cell?
thanks
Tina
December 6,
gridobj.getCellValue(column,row);
Karl Thoroddsen
December 6,
Thanks for respons.
i`m not java developer, but i just wont to try this great product.
i try this but it doesn`t work.Whot is wrong?
function MyFunction(){
var id = gridobj.getCellValue(0, index);
alert("current selection: " + id);


}

Thanks again
Tina
December 6,
var myData = [
["Titan", "A", "ventures.com"],
["www", "CNAME", "ventures.com"],
["mail", "MX", "ventures.com"],
["ftp", "CNAME", "ventures.com"]
];
var myGrid= new AW.UI.Grid;
myGrid.setColumnCount(3);
myGrid.setRowCount(4);
myGrid.setCellText(myData);
myGrid.setHeaderText(["Name","Type","Zone"]);
document.write(gridDNS);

And then somewhere: myGrid.getCellValue(0,0) which should return "Titan".
Karl Thoroddsen
December 6,
document.write(gridDNS); should of course read:
document.write(myGrid);

Sorry about that.
Karl Thoroddsen
December 6,
Well this is what i need. I wont do delete row with php. I use xml example with "load table" where my php script render data from mysql in XML format. i found the key code for delete someware on the forum.This is the script i don`t now wrer is mistake.


obj.setEvent("onkeydown", readChar);


function readChar(e)
{
var key = e.keyCode;
//alert(e);
switch(key) 
{
case 46:

answer = confirm("Are you sure to delete?");
if (answer) 
{
//here i wont to retreve row id from "0 column"
var index = obj.getSelectionProperty("index"); 
var id = gridobj.getCellValue(0, index)

//and after that something like that:
table.setURL("myXML_PhP.php?delete=true&id="+id);
}

break;
case 13:
answer = confirm("Are you sure to insert?");
if (answer) 
{
addRow(obj); 
}
break;
}
}


The problem is that i don`t now how to retreve the id for selected row on kaydown event.
sory about my english
Thanks Karl for every response.
Tina
December 6,
sory , forget abot part of "insert" kay
Tina
December 6,
I think the best way forward is to check out the examples folder that came with the AW installation.

The add delete row.htm should be very helpful.

Cheers
Karl
Karl Thoroddsen
December 6,

This topic is archived.

See also:


Back to support forum