Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highlighting the current row in grid
Message
From
12/04/2000 17:59:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00358923
Message ID:
00358983
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform