pcawdron
02-09-2007, 02:48 AM
I've trawled through the forums looking for something similar to this, but... how do you capture events inside a grid? Consider this...
<canvas debug="true">
<dataset name="dset">
<levelOne>
<levelTwo something="whisper">Hello</levelTwo>
<levelTwo something="whisper">There</levelTwo>
<levelTwo something="whisper">How</levelTwo>
<levelTwo something="whisper">Are</levelTwo>
<levelTwo something="whisper">You?</levelTwo>
</levelOne>
</dataset>
<view name="main">
<simplelayout axis="y"/>
<grid datapath="dset:/levelOne" name="dynamicGrid" onclick="Debug.write('onclick Grid')">
<gridtext datapath="text()" width="200" onselect="Debug.write('onclick',this.text)" onblur="Debug.write('onblur',this.text)"/>
<gridcolumn width="200">
<inputtext datapath="@something" onselect="Debug.write('onclick',this.text)" onblur="Debug.write('onblur',this.text)"/>
</gridcolumn>
</grid>
</view>
</canvas>
I'm obviously missing something, but I thought the onselect and onblur events for the gridtext would show me the values before and after someone clicked on the grid and edited the text.
I tried using an inputtext within a gridcolumn, but that also only shows the after event.
Anyone got any ideas on how these events are firing?
Thanks,
Peter
<canvas debug="true">
<dataset name="dset">
<levelOne>
<levelTwo something="whisper">Hello</levelTwo>
<levelTwo something="whisper">There</levelTwo>
<levelTwo something="whisper">How</levelTwo>
<levelTwo something="whisper">Are</levelTwo>
<levelTwo something="whisper">You?</levelTwo>
</levelOne>
</dataset>
<view name="main">
<simplelayout axis="y"/>
<grid datapath="dset:/levelOne" name="dynamicGrid" onclick="Debug.write('onclick Grid')">
<gridtext datapath="text()" width="200" onselect="Debug.write('onclick',this.text)" onblur="Debug.write('onblur',this.text)"/>
<gridcolumn width="200">
<inputtext datapath="@something" onselect="Debug.write('onclick',this.text)" onblur="Debug.write('onblur',this.text)"/>
</gridcolumn>
</grid>
</view>
</canvas>
I'm obviously missing something, but I thought the onselect and onblur events for the gridtext would show me the values before and after someone clicked on the grid and edited the text.
I tried using an inputtext within a gridcolumn, but that also only shows the after event.
Anyone got any ideas on how these events are firing?
Thanks,
Peter