Hi,
I'm implementing a function (copy grid data to clipboard) that requires all grid values in a javascript. First, I looked examples and cannot find one. Second i looked document and cannot find instructioin. I looked into infragistic installed directory, and find some javascripts, use trial and error to find out each function. Is there better way? Where is complete document for using objects?
But I'm still having problems. I'm able to get cell object, but I don't know how to get value. Here is how I get all cells:
function copyButtonClicked() {
var elm = document.getElementById('clipboardFormId:gridViewId'); // grid component id if(elm!=null) { var mygrid=ig.grid.getGrid(elm); if(!ig.isNull(mygrid)) { var gridbody = mygrid.getBody(); if(!ig.isNull(gridbody)) { for(i=0; i<mygrid.getRowCount(); i++) { for(j=0; j<mygrid.getColCount(); j++) { var cell=gridbody.getCell(i, j);
.....
}
I'm stucked here, I don't know what to do with object cell. How to get the value? I somehow get the innerHTML:
cell.elm.innerHTML
But it is not the value and somehow I cannot get column title.
I'm trying to find document for row, col and cell object function. I cannot find any. The online examples are not sufficient.
Please Help
Thanks
Yan
Hello, YanYou should create a new IgGridCell and after that you can use method get_value() or get_text() : for(j=0; j<mygrid.getColCount(); j++) { var cell=gridbody.getCell(i, j); var newCell = new IgGridCell(cell.elm); var text = newCell.get_text(); var value = newCell.get_value(); }
The js file "igf_grid.js" contains js functions conected with the grid .
Hi ,
Here in this script code, how can we get the particular cell which i entered the value in that cell, i need to set the focus for that cell. Because i am loosing the focus of the cell, i want to put the cursor in the particular cell.
Please send me the code. very very urgent.
Thanks,
A.Viswanath Yadav