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

x
?
Solved

What is the highlight Column event for VB6 DataGrid?

Posted on 2010-08-18
2
Medium Priority
?
753 Views
Last Modified: 2013-12-26
Hi All

I have built a Function that sorts columns on DataGrid1_HeadClick() event. Basically it sorts Asc if previous was Desc and Vice Versa. Problem is the data is sorted and the .Bookmark moves to the First row position, which is fine, but the Column highlight remains.

DataGrid control has always behaved this way i.e. if you click a header, whether sorting or not it highlight's entire column.

So problem is that I have built a Search function that moves the .Bookmark to appropriate row and even though I highlight the Row found, Using "DataGrid1.SelBookmarks.add FindData.Recordset.Bookmark" the Column highlight remains unless you physically fire the Row Click event.

So I end up with a Highlighted Black Cross effect ie. both Column and Row are highlighted.

So does anyone Know what Event Controls the Column highlight, and if so how to turn the blasted thing off??

I have looked everwhere on Google for this and can't find an answer.

Thanks
FLOG51
0
Comment
Question by:FLOG51
[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
2 Comments
 
LVL 17

Accepted Solution

by:
Zhaolai earned 2000 total points
ID: 33471703
Try this:

In the DataGrid1_HeadClick event, add this line,

    DBGrid1.SelStartCol = -1

0
 

Author Closing Comment

by:FLOG51
ID: 33471788
Hi Zhaolai

Thank You, Exactly what I was after.

Isn't it amazing how 4 hours of investigation and frustration can be solved with one very short line of Code. Gotta love programming!!!.

Thanks Again
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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

722 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