Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to force the grid to Activate the first column?
Message
De
09/04/2004 09:12:35
 
 
À
09/04/2004 08:42:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00893497
Message ID:
00893519
Vues:
24
>Thank You Fabio

hi Borislav,

In addition to Fabio's answer

You can add a method to the grid which returns the first column (users can move columns around)
&& then
local FirstColumn
FirstColumn = thisform.Grid1.GetFirstEnabledColumn()

if( !isNull(FirstColumn) )
    =FirstColumn.SetFocus()
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
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform