When I hit enter or dblclick in grid I would like to change the width Of the column I am on so I can see it all and edit it all.
Code: Select all
Define Grid Grid_1
WIDTHS {140,140,140,100,100,100}
ALLOWEDIT .T.
CELLNAVIGATION .T.
ON CHANGE ACTION MY2()
ON KEY RETURN ACTION MY1()
**********************
THE FOLLOWING DOES NOT WORK
**********************
Function My1
local avcell := form_1.grid_1.value
if avcell[2] = 2
Form_1.Grid_1. WIDTHS := {140,280,140,100,100,100}
endif
Return
Function My2
local avcell := form_1.grid_1.value
// do saves and so on. Then reset field widths
if avcell[2] = 2
Form_1.Grid_1. WIDTHS := {140,140,140,100,100,100}
endif
Return