Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids Behavior
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00425244
Message ID:
00425259
Views:
15
>I'm trying to execute a code everytime the activerow value change. For that, i create the activerow_assign method and type some code in. The problem is that this code is never executed. I don't know why. I have a grid with custom textboxes in each column.

I have the following code in my grid class:
PROCEDURE Init
* This.OldActiveRow is a property I added to my grid class
if !empty(This.RecordSource) and reccount(This.RecordSource) > 0
	This.OldActiveRow = RecNo(This.RecordSource)
else
	This.OldActiveRow = 0
endif
ENDPROC

PROCEDURE BeforeRowColChange
LPARAMETERS nColIndex
if !empty(This.RecordSource) and reccount(This.RecordSource) > 0
	This.OldActiveRow = RecNo(This.RecordSource)
else
	This.OldActiveRow = 0
endif
ENDPROC

PROCEDURE AfterRowColChange
LPARAMETERS nColIndex
* This.GridRowChange is a method I added to my grid class
if !empty(This.RecordSource) and reccount(This.RecordSource) > 0
	if This.OldActiveRow <> RecNo(This.RecordSource)
		This.GridRowChange()
		ThisForm.Refresh()
	endif
endif
ENDPROC

PROCEDURE gridrowchange
*-- method to place additional code to be called by AfterRowColChange only if the Row changed
ENDPROC
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform