Hi Strato,
I've modified example_gridfilter to show some of these cases (lib_page1_section2.prg).
So we have a common starting point and it is reproducible for everyone.
Code:
////////////////////////////////////////////////////////////////
// Event delegate for 'click' event
proc page1_section2_field1_click()
Lianja.get("section1").grid.filter = "startsWith(customerid, 'B')"
my_grid=Lianja.get("section1").grid
messagebox(vartype(my_grid))
endproc
////////////////////////////////////////////////////////////////
// Event delegate for 'click' event
proc page1_section2_field2_click()
my_row=Lianja.get("section1").grid.activerow
messagebox(transform(my_row,''))
Lianja.get("section1").grid.filter = "startsWith(customerid, 'A')"
endproc
////////////////////////////////////////////////////////////////
// Event delegate for 'click' event
proc page1_section2_field3_click()
//Lianja.get("section1").grid.filter = ""
my_grid=Lianja.get("section1").grid
my_grid.filter=""
endproc
These are buttons B and A.
Results:
Button A clicked: some number (of selected row before filtering in this example)
Button B clicked: O (=object type)
Button C clicked: no filter value
Parsing the commands is tricky in a programming language, so I use variables here, not the whole expressions.
Bookmarks