?
Solved

Returning row number problem with MSHFlexgrid

Posted on 2003-03-27
4
Medium Priority
?
217 Views
Last Modified: 2013-12-25
Hi,
I am trying to bold the text of the cell which is clicked upon in an MSHFlexgrid. The .row is being returned wrong though.
If I click on the 2nd row, it says .row = 1 when it should be 2.
If I click on the 3nd row, it says .row = 2 when it should be 3.
If I click on the 1st row, it tells me that the .row value is whatever the .row value was the last time I clicked on a cell when it should be 1.
I have one fixed row at the top and two columns.
I know the rows start at zero and this is not the problem. I assume there is a problem with the way I am setting up the flexgrid.
Has anyone any ideas where I'm going wrong?
Thanks for any help!
0
Comment
Question by:robinsql
[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
4 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 450 total points
ID: 8218656
Hi robinsql,

Use .MouseRow in your _Click event for the flexgrid rather than the .Row property this is much better when dealing with clicks as sometimes the .Row property is not set until the event has been processed.

Tim Cottee MCSD, MCDBA, CPIM
http://www.timcottee.tk 

Brainbench MVP for Visual Basic
http://www.brainbench.com

Experts-Exchange Advisory Board Member
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 8219572
probably what you are seeing the that the .Row returns the number of the row, NOT COUNTING any Fixed Rows.  When you say 2nd row, that is COUNTING the FIXED row, so it REALLY is the first row of actual data...

AW
0
 
LVL 5

Expert Comment

by:avya2k
ID: 8223662
or try writing your code in Mouse_up event
0
 

Author Comment

by:robinsql
ID: 8223872
Hi Tim,
Thanks. That worked with a little bit of tinkering.
0

Featured Post

Industry Leaders: 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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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

764 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