Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxy classes edit grid records limit
Message
From
10/12/2003 11:10:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00857692
Message ID:
00857702
Views:
22
>Hi Cetin
>
>Been trying to get the edit grid class to limit the number of lines in the grid. I've tried putting stuff in the AfterRowColumn change to count how many I have on my grid, if theres say 25 I want to not allow any more to be added, but allow the user to edit the least line or previous lines.
>
>Can you point me in the right direction?
>
>Best Regards
>
>Robin

For a quick implementation you could use AfterRowColChange :
*Editgrid.AfterRowColChange
lParameters nColIndex
with this
 if !mdown() and lastkey() = 145 ;
    and !(.lValidate and !evaluate(.cValidation)) ;
    and reccount()=25 && Letting max 25 records
    keyboard '{SPACEBAR}' && Fake to change lastkey
    inkey() && Clear buffer
 endif
endwith    
dodefault(nColIndex)
PS:Not tested - off the top of my head.
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
Reply
Map
View

Click here to load this message in the networking platform