PDA

View Full Version : ondblclick for a grid?


thecow
05-04-2004, 11:59 AM
Hi all,
I would reallly like to run some scripts with either a click or dblclick on a grid. If I can send an event when they click on a row, it will be much more user friendly than making them press a button.

I have also noticed that my windows are not firing onblur and onfocus events.

I am thinking that Delegates might be my answer, but I cannot figure them out totally just by reading the documentation.

Is there any chance someone could show me a quick and dirty example with the grid/ondblclick?

Thanks for any help!!!

huntedman
10-04-2005, 02:57 AM
<grid name="gridMessages" id="gridMessagesid"
datapath="<your datapath>"
contentdatapath="<SomeContent>"

<method name="itemDoubleClicked" args="item" event="ondblclick" >
if (item != null)
{
debug.write("double: " + item);
}
</method>
<method name="itemSelected" args="item" event="onselect">
if (item != null)
{
debug.write("single" " + item);
}
</method>

ProdrBust
10-19-2005, 07:12 AM
I checked in OpenLaszlo bug tracking and ondblclick for the GRID is listed currently (as of this posting)as an unresolved issue.

onselect does work when highlighting a row of data, but ondblclick currently doesn't.

<grid name="gridMessages" id="gridMessagesid"
onselect="Your Code Here">