Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locking current grid row
Message
From
02/11/1998 13:10:43
 
 
To
30/10/1998 10:20:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00152154
Message ID:
00153636
Views:
28
>>>>>>I can dynamically disable all rows in a grid leaving only the
>>>>>>current row enabled (after an append). However the user can still
>>>>>>move the record pointer to another row by clicking. How can I
>>>>>>prevent this ?
>>>>>>
>>>>>>Regards Ian

Cetin,

Thanks for the code. I've managed to get the current grid row to lock.
However, i've needed to alter the .top/.bottom settings of the grid,
which i don't understand (see code). Any suggestions on what i'm missing ...?

LPARAMETERS nColIndex

LOCAL llChangingRow, lnRowPos, lnColPos

llChangingRow = .F.
STORE 0 TO lnRowPos, lnColPos

IF Thisform.Navigate.EditMode
*< Add/edit mode ... >*
IF MDown()
lnBottom = This.Top+This.HeaderHeight+(This.RelativeRow*This.RowHeight)
lnTop = lnBottom - This.RowHeight

*< ???? Top=7 HeaderHeight=23 RowHeight=23 >*
lnBottom = lnBottom + 28
lnTop = lnTop + 34

lnRowPos = MROW(WONTOP(),3)
lnColPos = MCOL(WONTOP(),3)

llChangingRow = !BETWEEN(lnRowPos,lnTop,lnBottom) AND ;
BETWEEN(lnColPos,This.Left,This.Left+This.Width)

*Messagebox("Row: "+str(lnRowPos)+" Bottom: "+str(lnBottom)+" Top: "+str(lnTop))
ELSE
llChangingRow = INLIST(LASTKEY(),24,5,28,3,145,148)
ENDIF && MDown

IF llChangingRow
NODEFAULT
ELSE
*< Do nothing >*
ENDIF && llChangingRow
ELSE
*< Do nothing >*
ENDIF && Thisform.Navigate.EditMode

Regards Ian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform