Dwntrdr


Hi All;

I'm seeing something that logically shouldn't happen and I am wondering if someone else has seen the same / similiar.

(VFP9, SP1 )

I have a grid that loads information in text boxes based on the selected cell. These text boxes can also be filled by a lookup button. When I load the info by clicking on a cell, all info displays correctly. I then use the lookup button; again all info displays correctly. Now it gets wierd. I click on a blank cell, which should not update the info, but it does. Following the code through in debug I can see that the afterRowColChange event is being fired before and after the clicked cell is selected. When it is fired before the move, it loads the original info, cause that cell is not empty. How do I know you ask The function that does the info fill has the suspend. When it suspends on the screen you can see the original cell selected. "Resume" and when it stops again, the new cell is selected.

So there ya' be... I would greatly appreciate it if anyone who has seen this and knows of a workaround or why it may be occurring I'd like to hear from you.

I know I could add properties that would store the current recno() / column info, and check that before I update the textboxes but for some reason, I have this desire to see foxpro work as it is supposed to / is documented to...

Thanks,
Rob.




Re: grid.afterRowColChange event seems to fire twice - once before moving to the new cell...

Dwntrdr


Wow... way back in FP3 this was occurring but never fixed and documenation never updated
http://support.microsoft.com/kb/132353







Re: grid.afterRowColChange event seems to fire twice - once before moving to the new cell...

Dwntrdr

No thoughts anyone

Well, using the rowColChange property I now check to see if anything change and don't fire my update code until it does. I thought I'd post this in case someone else ran into the same 'wall'... :-)

Rob.