Custom color for Database grid row/columns?

natrajv
09-12-2004, 12:06 AM
Hi

I dont find any option to customise foregroud/background color for individual row/columns of DataBaseGrid-OLEDB ActiveX component.

Any help?

NEOLLE
09-12-2004, 10:17 PM
I know a component. Its a VS FlexGrid. You can set the forground and backcolor of you grid alternately.

natrajv
09-12-2004, 11:25 PM
Is it like MS-FlexGrid?. Does it supports datasource as recordset?

I like to know about any other third party activeX componet available with this capability.

NEOLLE
09-13-2004, 03:47 AM
Is it like MS-FlexGrid?. Does it supports datasource as recordset?

I like to know about any other third party activeX componet available with this capability.

Yes, it does. You can search it, Im sure you'll find its website. Its Free.

Flyguy
09-13-2004, 04:26 AM
The vsFlexGrid is NOT a free control.
It's owned and maintained by ComponentOne (www.componentone.com)

Back to original question;
The MSFlexGrid is capable of all kind of cell coloring, but can not be bound to an ADO dataset, but you can easily parse a recordset and add the data to the grid.
The MSHFlexGrid can be bound to an ADO dataset.

For all kind of samples for using the MS(H)FlexGrid have a look at .. thread.

natrajv
09-19-2004, 10:27 PM
Thanks flyguy...using MSFlexGrid is not possible, since my recordset consists of thousands of records which can not be effeciently handled by it. I never used the other component MSHFlexGrid. I will get back to you after trying it once.

Meantime can you refer any free component link which gives this ability?

natrajv

natrajv
09-20-2004, 03:41 AM
Thanks flyguy...using MSFlexGrid is not possible, since my recordset consists of thousands of records which can not be effeciently handled by it. I never used the other component MSHFlexGrid. I will get back to you after trying it once.

Meantime can you refer any free component link which gives this ability?

natrajv
Hi Flyguy...
MSHFlexGrid accepts recordset. but, after setting its recordset source I dont how to format column color. Since, individual cells are refreshed through recordset, I dont find anyway to change color of columns using a single command.
I expect a simple command such as,
MSHFlex(1).column.forecolor = vbRed.

Any help?

Flyguy
09-22-2004, 01:43 AM
Have a look at the .. thread in the Code Library for all kind of formatting samples.

natrajv
09-23-2004, 09:57 PM
Thanks flyguy... But, functions mentioned by you may not solve my problem.
Since, datasource of HFlex grid is huge recordset, flex grid can not be formatted cell by cell and it has to be formatted as user moves the scoll bar. I hope you can understand my problem.

Further help requested...

Flyguy
09-25-2004, 05:55 AM
I don't have a computer with VB installed at the moment, but there should be some flexgrid events to indicate that there has been scolling activity and/or selection changes.
If you start changing cells starting from the current TopRow then you it should be possible to get it faster.
Don't forget to use the .Redraw property to prevent flickering.
Also have a look at the .FillStyle property to change a range of cells with a single instruction.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum