Ohhh,it's just there for generating a new local aliasname. It was my laziness I derived the code from one of my class codes and didn't touch that part.
Cetin
>Thanks Cetin for the reply. Please help me understand the line:
>
>lcAliasName = "tcSelector"+padl(select(0),3,"0")
>
>>>I have a grid that has a logical field and the recordsource is from a cursor. The coulumncount is set to -1 so the columns are automaticly filled. How do I show the logical column DoPrint as a checkbox?
>>>
>>>Thanks
>>John,
>>Below sample is a grid that's just dropped from control toolbar (default grid - columncount -1).
>>with this
>>select .f. as lSelected,* ;
>> from home()+"samples\data\customer" ;
>> into cursor myCursor
>>local lcAliasName
>>lcAliasName = "tcSelector"+padl(select(0),3,"0")
>>use (dbf("myCursor")) in 0 again alias (lcAliasName)
>>select (lcAliasName)
>> .recordsource = lcAliasName
>> .columns(1).addobject("Check1","Checkbox")
>> .columns(1).currentcontrol = "Check1"
>> .columns(1).Check1.caption = ""
>> .columns(1).Check1.visible = .t.
>> .columns(1).sparse = .f.
>>endwith
Cetin