-
From a button in a canvas section, how can I activate a grid in a grid section?
From a button in a canvas section, how can I activate a grid in a grid section?
-
Lianja Support Team
This functionality has been added into beta5 Refresh 2.
Note also that you can use the addItems() method to populate a grid from an array. (See below). Also notice how in Lianja you can create arrays in VFP scripting using the { .... } constructs (same as PHP and JavaScript).
////////////////////////////////////////////////////////////////
// Event delegate for 'click' event -- populates the grid using SQL
proc page1_section2_field1_click()
mygrid = Lianja.findElementByID("mygrid").grid
mygrid.clear
mygrid.addItems("select * from southwind!example")
endproc
////////////////////////////////////////////////////////////////
// Event delegate for 'click' event -- clears the grid
proc page1_section2_field2_click()
mygrid = Lianja.findElementByID("mygrid").grid
mygrid.clear
endproc
////////////////////////////////////////////////////////////////
// Event delegate for 'click' event -- populates a grid from an array
proc page1_section2_field3_click()
mygrid = Lianja.findElementByID("mygrid").grid
mygrid.clear
myarray = { {"one", "two"}, {"Three", "Four"} }
myheader = { "Name", "Value" }
mywidths = { 100, 200 }
mygrid.addItems(myarray, myheader, mywidths)
endproc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks