Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

At last I found it - MSHFlexGrid selection

Status
Not open for further replies.

bzac

Programmer
Dec 20, 2000
55
US
I was not getting any proper answer from the discussion forum for my repeated posting on MSHFlexGrid - Mouserow selection. Now here is a tip for solving that.(I don't know wheather everybody aware of it or not, still it's a knew information for me).

Problem:- MSHFlexGrid is not returning the correct mouserow till you clicked once on the scrollbar of the control, it is returning mouserow - 1.

Situation:-
I have two dropdown combo box, One for selecting "Pipe-Line" and the other for slecting "Product". MshFlexGrid is for populating customers/producers for that combination.

The problem starts only after binding a recordset with 0 recordcount.

Tip:-
Before setting the datasource for mshflexgrid, check for the recordcount > 0.
 
Thanks for the tip! That solved my problem as well.

In my case, I was using the filter property on an ADODB.Recordset object, that would sometimes result in no records in the recordset after the filter is applied. Unfortunately, since the recordset is already bound to the grid when the filter is applied, I had to modify the code to retrieve a new recordset rather than filter the current one.

Not an ideal solution, but it works.
 
[thumbsup2]

thx a lot bzac!
I've been working on this bug for a long time, and you've helped me to solved it! ^__^
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top