Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

EVENT's processing

Posted on 1998-09-21
5
Medium Priority
?
436 Views
Last Modified: 2008-02-01
I am working with a custom control, and have a question about the processing of events.  The custom control uses MSFlexgrid control, and there is an event RowColChange that fires when the selected row is changed. In the control, I have some fhunctions that I want to perform, but I want them to occur after the msflexgrid does it's thing. Problem is that my event is being handled before MSFlexgrid does it's stuff.


How do I make my code execute after the internal code?

I am trying to change the position to the last row, once the user has bumped the top, but what results is a selection of the entire grid until the keyboard is touched.

Any suggestions are greatly appreciated.

Ronnie
0
Comment
Question by:redbaron082997
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:fguerreiro_inix
ID: 1435943
Call your code from internal code.

Raise your event in msflexgrid events.
0
 
LVL 1

Author Comment

by:redbaron082997
ID: 1435944
In the control, the event is being handled like this:
private sub msFlexGrid1_RowColChange()
   raiseEvent RowColChange() 'This is where the programer will add events. At this time, MSFlexGrid has not completed doing it's stuff, as it should
end sub


0
 
LVL 2

Expert Comment

by:schild
ID: 1435945
Though when selecting a cell's group the RowColChange occure, as far as i know the MSFlexGrid, the RowColChange event doesn't file according to selection changes, but according to cell clicking, which is different from selction of cells group.
The Reason that RowColChange occure is, when you slect a cell's group you are usualy click one of the square corner and then, the cell clicking invoke the RowColChange's event.
In any case, if you mean the cell's clicking event, then at my flexgrid (sp2 version) the event fire after the new cell clicking.
If you mean the selection itself, there is another event called "SelChange", try it.

Good luck
Schild
0
 
LVL 1

Author Comment

by:redbaron082997
ID: 1435946
Here is what is happening:
my program loads data into the grid, and positions the cursor in the center.  Then when the user selects cell 0, it is captured (either by rowcolchange, or selchange) and the data is reloaded, adding 50 records to the top, and 50 to the bottom of record 0, and again positions the cursor, in the middle. The problem is when I capture this event, it has not yet completed it's call stack of positioning to cell 0, and if I tell it to posistion to cell 50, and I perform the rowsel, colcel, to hilite cell 50, then when it finishes the call stack, I get a selection of 0 to 50, due to the msflexgrid.row property changing back to 0 when it leaves either of my event proc's.

Any ideas how to correct this? I am raising the points due to the complexty of the question.
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 200 total points
ID: 1435947
Start a timer on the event.
private sub msFlexGrid1_RowColChange()
  timer1.enabled = true
end sub

private sub timer1_timer()  ' Or some
 timer1.enabled = false
 'do your stuff here
end sub

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question