how to marked rows with color in datagrid using vb6

Posted on 2005-04-06
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
    LVL 53

    Accepted Solution

    LVL 53

    Expert Comment

    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
    LVL 44

    Expert Comment

    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

    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

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

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    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…
    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…

    733 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now