I'm trying to select an item in a grid based on a data node. I've created
a subclass of grid and defined a method which gets called when the grid
has finished loading. By default I do a selectIndex(0) which works (most
of the time). I'm now trying to add code to reselect a particular row
based on the data it contains. My current code does this:
node = datapath.xpathQuery("... some xpath query");
item = getItem(node);
Debug.write("item: " + item);
if (item) {
Debug.write("Selecting row");
select(item);
}
I know this code gets executed and it appears to find the proper data.
When the debugger writes out the 'data', I see that it is a
'basegridrow'. However, when the select code executes, nothing visibly
happens in the application. I've also tried just using a selectItem(node)
and that doesn't work either. If I try a getIndexForItem(item) the value
returned is -1. Obviously there is some disconnect between the node that
I found with the getItem method and the actual grid I'm using, but I'm not
at all clear why this shouldn't be working. If someone can help me figure
this out I would appreciate it.
Thanks!
--
James Howe
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user