Adding to the replies of Miguel and René, you can force a setrow( getclickedrow() ) in the clicked event of the DW control to circumvent the "having to click the display column" caveat. Clicking a protected column will thus select the row and set the cursor to the display column.
Here's what I'm using in the clicked event to address this:
long ll_col, ll_protect = 0
string ls_colname, ls_protect
ll_col = getclickedcolumn( )
if ll_col > 0 then
ls_colname = this.describe( '#' + string(ll_col) + '.name')
ls_protect = this.describe( ls_colname + '.Protect' )
// If not a number, evaluate the expression
if not isnumber(ls_protect) then
// Cutting off leading "1~t" or "0~t"
ls_protect = Mid( ls_protect, Pos(ls_protect, '~t') + 1 )
ls_protect = Mid( ls_protect, 1, len(ls_protect)-1)
ls_protect = this.describe("evaluate(~"" + ls_protect + "~", " + string(getclickedrow()) + ")")
end if
if isnumber(ls_protect) then
ll_protect = long(ls_protect)
// else: give up :)
end if
end if
if ll_protect = 1 then
/*
adding
or ll_col = 0
to the condition will also select the row
if any non-column part of the row was clicked,
which might be useful
*/
this.setrow( getclickedrow() )
end if
This might be too elaborate even, a simple
setrow( getclickedrow() )
in the clicked event probably does the trick already. Might even work without any display columns, but I haven't confirmed this.