Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmaticaly addrow to grid and deleterow from grid
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Programmaticaly addrow to grid and deleterow from grid
Miscellaneous
Thread ID:
00714250
Message ID:
00714250
Views:
46
Hi All,
i have a grid and i am using for programmatialy addrow to the grid this method

i have put new proprty to the form named Mycolumn with value 1

BeforeRowColChangeEvent Code

LPARAMETERS nColIndex
ThisForm.Mycolumn = ncolindex

AfterRowColChangeEvent Code

If !EOF() .And. LastKey() = 13 .And. nColIndex < ThisForm.Mycolumn
Skip
If EOF()
Append Blank
EndIf
EndIf


this code adding new row to the grid (blank record too) when i pressed key at last column.

at this point i have two question

a-how can i do this action at last row in any column ?
b-how can i cancel this action via press UpArrow if didn't change any field at this row (same way this recno) and the record didn't buffered ( form is PrivateDataSession,Pessimistic,buffer mode 5)

(this action there is a DBGRID in Delphi)

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform