untill now I had hardcoded the codeblocks for every column of a xBrowse, like
- Code: Select all Expand view
- oBrw:aCols[1]:bLClickHeader := {|| Sort(1)}
oBrw:aCols[2]:bLClickHeader := {|| Sort(3)}
oBrw:aCols[3]:bLClickHeader := {|| Sort(2)}
this worked fine, but now I want to assign the numbers using an array like
- Code: Select all Expand view
- aSort := { 3, 1, 2 }
for nI := 1 to len(oBrw:aCols)
oBrw:aCols[nI]:bLClickHeader := {|| Msginfo(aSort[nI])}
next
But if I click a header, doesn't matter which one, I always get as a response "2" (the last item of the array), but I wanted by clicking at the header at the first column a "3" and on the second column a "1"
Do you have any suggestion how to solve this problem?