Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Highlighting the current row in grid
Message
De
12/04/2000 17:59:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00358923
Message ID:
00358983
Vues:
23
>Cetin:
>
>I get the same results when using your highlight class. All records added to grid stay highlighted.
>
>Looking in the watch window I confirmed currec = recno(), so it should work. Turning off buffering still fixes it. I wonder if it has something to do with the negative record numbers for appended records in a buffered table?
>
>Charlie


Charlie,
I'm not sure but I think it's related with AllowAddNew property = .t. For that purpose I have another class that replaces the functionality with Ctrl+DnArrow for adding. It works as intended and has this code in ARCC :
LPARAMETERS nColIndex
with this
  .allowaddnew = .f.
  if lastkey() = 145 and iif(.freetable,.t.,;
     !(!empty(dbgetprop(.recordsource,"Table","RuleExpression")) ;
	and !evaluate(dbgetprop(.recordsource,"Table","RuleExpression"))))
	go bottom in (.recordsource)
	.allowaddnew = .t.
	keyboard "{DNARROW}"
	.refresh
  endif	
  if !empty(.cKeyField)
	if empty(eval(.cKeyField))
		replace (.cKeyField) with eval(.cKeyExpression)
	endif
  endif
  .nCurRec = recno(.RecordSource)
  thisform.LockScreen = .F.
  IF !.lInGrid
	.refresh()
  ENDIF
  .nActiveColumn = .findcolumn(.ActiveColumn)
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform