Found the solution.

 

At grid level use onselect event instead of onclick.

 

Now the issue why the setFormPointer is not getting the element I have
selected in the grid. I try to open another window defined as a class, but
no data populates. Seems the dataset is not available for the second window.

 

Thanks for your input.

 

pedro

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Pedro
Martinez-Chico
Sent: Friday, November 13, 2009 10:50 AM
To: [email protected]
Subject: [Laszlo-user] Grid element and onclick event

 

Hello,

 

How can I trigger an onclick event for an element of a grid, I don't know at
what level the handler is supposed to go.

 

Thanks in advance for your help.

 

Here is my grid.

 

<?xml version="1.0" encoding="UTF-8" ?>

<canvas debug="true">

 

      <splash/>

      <greenstyle name="greencolors"/>

    <bluestyle name="bluecolors"/>

    

      <include href="WindowLib.lzx"/>

 

      <dataset name="dsprokb" request="true" type="http"
src="http:prokb.xml"/>

      <window name="main" title="ProKBWeb" fontsize="11"

                  width="650"

                  height="350" resizable="true"

                  closeable="false" 

                  bgcolor="0xFFFFCC">     

                  

            <tabs style="greencolors">

                  <tabpane> Solutions

                        <grid datapath="dsprokb:/*" sizetoheader="false"
showvlines="true" bgcolor0="$once{greencolors.basecolor}">

                              <gridtext editable="false" width="50"
datapath="position()" resizable="false" sortable="false">

                                    #

                              </gridtext>

                              <gridtext datapath="@KBID"> Kb. Id.
</gridtext>

                              <gridtext datapath="@DESCRIPTION" width="450">
Description </gridtext>

                              

                                    <handler name="onclick">

                                                      var childwindow = new
lz.Childwindow(canvas);

 
childwindow.datapath.setFromPointer ( this.datapath );

                                                </handler>   

                        </grid>

 

                  </tabpane>

 

            </tabs>

      </window>

 

</canvas>

 

 

Reply via email to