how to marked rows with color in datagrid using vb6

Posted on 2005-04-06
Medium Priority
Last Modified: 2007-12-19
Hi, any ideas on how to mark a specific rows with color in datagrid using visual basic 6? Thanks.
Question by:kiho123
  • 3
LVL 53

Accepted Solution

Dhaest earned 1000 total points
ID: 13714641
LVL 53

Expert Comment

ID: 13714647
No. It cannot be done!

You can use the standard flexgrid control that ships with VB but this does not have the ability to enter data directly into cells, nor does it happily handle data-binding with ADO recordsets.

A better idea might be to buy a control which does it all such as the TrueDBGrid or VSFlexgrid from http://www.componentone.com 
LVL 43

Expert Comment

ID: 13714662
Hi kiho123,

The simple answer is "Use another grid"

Essentially you cannot, the datagrid is not capable of complex cell formatting! There are basically two types of grid that you get with the standarad VB package, the datagrid which has in-cell editing and other data binding features and the flexgrid which has complex cell formatting but not the in-cell editing and so on of the datagrid.

Your choice is which of these do you want? You can emulate some of the features of each with the other but it is never truly satisfactory or you can accept that the grid just doesn't do it and either find another way or forget it, or you can look for a fully featured grid control that has all the features you want. ComponentOne produce the truedbgrid and vsflexgrid controls which are in reality the controls that have been hamstrung to give you the default datagrid and flexgrid controls in vb but have many more features. There is also the Janus GridX product and many more out there at different prices from *FREE* to *Ludicrous*.

Personally I use the VSFlexgrid but that is partly a corporate choice.

Tim Cottee

Author Comment

ID: 13714732
Thanks for the comment. Anyway i have no idea on how to use the Flexgrid or VSflexgrid currently. Is both of this grid free to use? Actually i need a grid in vb6 that have a capability to retrieve and show row of records which retrive from microsoft access database. Beside, system can auto marked or highlighted specific row with color inside the grid. If Flexgrid or VSflexgrid can do that, do you any example on it. Thanks

LVL 53

Expert Comment

ID: 14366151
My recommandation: question answered by me (Dhaest)
First one to give the correct answer that his question is impossible.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

850 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