Hi,
To fulfill the requirement, I need to use client side scripting such as:
<script type="text/javascript">
function
activeCellChanged(sender, args) {
alert("row activated:" + activeCell.getRowIndex());
ig.smartSubmit('caseDetailForm:tranGridView',null,null, 'caseDetailForm:tranDetailPanel', null);
}
</script>
<ig:gridView>
<ig:gridClientEvents activeCellChanged="activeCellChanged">
...
</ig:gridView>
my question is:
1) Are there more events for ig:gridClientEvents that I can catch? I know there are enteredEditMode. Where is the complete documentation for it?
2) How can I retrieve grid value? For example, I need to get the value of first row and secnd column?
thanks.
I see how to get grid object by using:
cell.getGrid(),
There is one more question about get the value of specific row and column. For example, I want to get the value at row 2 and coloumn 1. grid object should have the method to provide it. right?
Thanks.
Hi:
This functionality is included in release 9.1 which came out Monday. Watch componentsforjsf.com early next week for samples and explanations of how to do the things you're looking for.
Also, the 9.1 sample browser has a sample in it which demonstrates all the grid objects etc.
Thanks,Jim
Hello Jim,
Thanks for your suggestion. I find out the way to get the cell value using the grid object.
Yan: Here is the solution for you:
zap(sender, args) {
var
cell = new IgGridCell(args.get_browserEvent().target);
grid = cell.getGrid();
var myrows = grid.elm.childNodes[1].childNodes[1].rows;
var cells = myrows[1].cells;
alert(cells[0].childNodes[0].data);
Thank you.
Roshan
Yan:
You are correct! All the CSOM stuff was added in 9.1.
Best,Jim
Hi Jim,
I just want to comfirm this with you: The functions used in CSOM examples are not in version 8.2, right?
Thanks,
Yan
Yan, Roshan:
For a vareity of reasons - most to do with how http an AJAX work - the grid rows are not delivered to the client as a collection. Once you've usedvar grid = cell.getGrid();
to get a handle to the grid, you can access the visible row in the array
grid.elm.childNodes[]
Are you using Firebug? I would guess so, but if not I highly recommend it to aid in examining the objects available on the browser at runtime.
I hope the Yan is trying to get the cell value by using the reference of the Grid object in CSOM. The sample at componentforJSF site shows to get the cell values from the row and its child elements which is cell.
I am not sure if we can get visible rows collection using the grid object by following way:
var grid = cell.getGrid();
Now, Is there a way, we can get visible rows collection using the grid object?
Thank you