try setting up a Listener Object so you get an eventobject passed to you. then
you can get at it like this:
eventObject.target.selectedItem.PKeyAccountID
It works for me but my grid contains a recordset, don't understand it well
enough to know if it works in your case
good luck.
bluestix - 02 Mar 2004 10:28 GMT
I actually already knew how to get the value of the List.selectedItem but I
wanted to do the same for multiple Items.
I figured out a way to do it but it doesnt really make sense to me and doesnt
work exaclty as I would like.
It looks like this:
on(press) {
selItems = Contract.selectedIndices;
trace("The selected indices are "+selItems);
trace("selItems.length is "+selItems.length);
var IndexArray = "";
var IndexArray = new Array(selItems.length);
var myArray = Contract.selectedItems;
trace("The selexted items are "+Contract.selectedItems);
trace("The selected Items are "+myArray);
for (i=0; i<selItems.length; i++) {
for (PKeyAccountID in myArray[i]) {
trace ("myArray." + PKeyAccountID + " = " + myArray[i][PKeyAccountID]);
var pushed = IndexArray.unshift(myArray[i].PKeyAccountID)
trace("Items added to Index Array are "+pushed);
trace(IndexArray);
}
}
var IndexArray2 = IndexArray.toString()
trace("the String is "+IndexArray2)
}
on(release) {
getURL("PrintSort.cfm", "_blank", "POST");
}
This only kindof works. I am still trying to make sense of it.