LPARAMETERS nKeyCode, nShiftAltCtrl >if nkeycode=24 >select income1 > append blank >This.Parent.Parent.Column1.combo1.setfocus >endif>I want the user will get the focus of the next line by pressing on the arrowdown key (number 46), every thing is good, but the user getting the focus on the right column, how can I give him focus on the left column?
&& Form.Keypress LPARAMETERS nKeyCode, nShiftAltCtrl if nkeycode=24 NODEFAULT select income1 append blank =this.YourGridName.Refresh() && or this.Refresh() =this.YourGridName.FirstEnabledColumn_SetFocus() endif && add this to your grid class && method: FirstEnabledColumn_SetFocus() local FirstCol FirstCol = this.GetFirstEnabledColumn() do case case isnull(FirstCol) =this.SetFocus() otherwise =this.SetFocus() =FirstCol.SetFocus() endcase && method: GetFirstEnabledColumn() ** loop through columns local _col, mincol, mincolorder, i mincol = Null for i = 1 to this.ColumnCount _col = this.Columns[i] if( !_col.ReadOnly and _col.Enabled and _col.Visible ) if( IsNull(mincol) ) mincol = _col mincolorder = _col.ColumnOrder else if( _col.ColumnOrder < MinColOrder ) Mincol = _col Mincolorder = _col.ColumnOrder endif endif endif endfor return MinCol