Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving around in a grid
Message
De
06/01/2004 10:08:09
 
 
À
06/01/2004 09:37:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00864158
Message ID:
00864170
Vues:
16
Kevin,

In addition to Yuri's comment

In the form Keypress
if the key is CR or TAB
    if( the active control is the grid )
        if( it's the grid's last enabled column )
           NODEFAULT
           KeyBoard '{DNARROW}'
           FirstEnabledColumn = _grid.GetFirstEnabledColumn()
           if( !isNull(FirstEnabledColumn) )
             =FirstEnabledColumn.SetFocus()
           endif
        endif
     endif
endif

&& grid 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
>Is there an easy way to code a grid so that if there are three columns, that after entering data in the third column, it could automatically skip down to the first column in the next row?
>
>There does not seem to be too many methods you can use with a column on a grid.
>
>Thanks,
>
>Kev
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform