How To Set Color On Particular Column Of Datagrid?
How can I set the color of the column(s) in datagrid? The purpose is to highlight the column that is allowed for editing.
Thanks in advance.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
DataGrid Column Color Help
I have a DataGrid with some columns locked and some not. I would like the unlocked columns to have a white background in the rows and the locked columns to have a grey background.
Is this possible? I can't seem to make them different they seem to all have to be the same color
Thanks for any and all help.
DataGrid Column Color
I have a ado Datagrid with 5 columns. I would like to change the backcolor to gray but only on column 0. Does anyone know how to do this?
Thanks In Advance
Datagrid Column/ Cell Color
I have a quastion: is it possible to give the columns in a datagrid
different colors. For example columns 0 to 4 white and columns 5 to 6
yellow.
Even better is to give the cells a different color and not the columns, that
makes it more flexible for me.
greating jeroen
Set Color In Listview Column
Hi all,
Is there anybody know how to set color into ListView column. Currently the listview has 3 columns and the program needs to check if the column A value = "Approved", the color code for column B has to set it to red colour else set it to blue color. The color for column A and column C should remain the same.
Thanks.
From,
SC
ListView Column Color
Hi there...
How can I get different colors for each column in a ListView control ???
1st column = vbGray, 2nd column = vbGreen...................
Is it possible ???
I only know using Rows, alternating them (Mod 2), but I have no idea about the columns...
Could anyone help me ???
Thanks a lot
Marcos.
Grid Column Color
How can the color of a particular column be changed in datagrid keeping rest columns unchanged.
Bhavesh Shah
MSHFlexgrid Column Background Color
Hi -
Is there any way to get the cells of one column in an MSHFlexgrid to have a different background color than the rest? I am under the impression that the CellBackground color property cannot be used in run-time.
thanks!
->dan
Extend Color Last Column To All Sheet.
Hi,
I have hidden all columns from "K" to the end of the Sheet (column IV) and all cell have a color set. At the moment at the right side of the last column to the border of my Sheet I have a color gray. Is it possible reach dynamically the border of the Sheet, extending the color of my last column?
Any idea? Thanks in advance.
Regards,
Giovanni
Changing Column Color In MS Chart With VB 6
I am developing a client application with VB 6.0 that uses a 2D MS Chart diagram with 7 columns. I’m trying to change the color of the first and the last Column to red and the rest to green, bud without successes. Could anyone give me a hint, if this is possible or not and how to realize that.
RolfD
São PauloBrazil
MS Flexgrid - Set Fore Color To Specified Column
Hi i searched the vbforums regarding my problem, unfortunately i found nothing...
I have 5 columns
Code:
-------------------------------------------------------------------------
Magazine Title |No of Copies |Discount |Price per copy |Total
-------------------------------------------------------------------------
Sample1 |10 |10% |$9.00 | 81.00
-------------------------------------------------------------------------
Sample2 |10 |10% |$9.00 | 81.00
-------------------------------------------------------------------------
Sample3 |10 |10% |$9.00 | 81.00
-------------------------------------------------------------------------
I want to change the forecolor of the column for discount... how can i do it in MS Flexgrid.
If i miss a thread that had an answer to my question please post the link og that thread here in my thread... thanks
Background Color Of FlexGrid By Column
Ok, I know how to change the order of columns now, but I would like the color of the column (or at least the column header) to change on mouse down so the user knows they are about to change the column order.
It would also be nice to put a dark line inbetween the columns that the user is about to drop the column into, but that would be a lot hard to do I think.
Here is my project:
Change Color Of MSChart Column?
Hi,
Has anybody got any idea on how to change the color of a column in an MSChart graph in runtime (not designtime!).
Thanks in advance
Shaun
Listview Column Header Color Change?
Hi, I would like to change the color of the column header background color and can't find how to do this. I searched all over on here and PSC. Does anyone know how to do this and have a sample code?
Thanks for your help!
Listview: Background/foreground Color In Each Column?
Is there a way to change the background/foreground color in each individual column in a ListView control?
Alternatively, I'd like to use subheaders like I can in HTML tables.
Click here to see what I mean.
John
Edited by - o1sowise on 3/9/2004 7:35:09 AM
Add Column To Datagrid
Hi everybody; I hope one of you can help me.
I am displaying a table with a datagrid and want to add a column with the values from another table as it's contents.
Both tables have columns titled CODE. The second table has a field called TYPE that corresponds to the CODE (eg. CODE 101 means TYPE Maintenance). What I want to do is put the values of TYPE from the second table into the datagrid displaying the first table I'm not allowed to add a column into the table being displayed by the datagrid.
I'm connecting to the database thru Adodc (DISA for the first table; CODES for the second table)
I found this but when I try to populate the fields from the second Adodc (CODES) it doesn't work. I figure that's because the Datagrid1 is connected to DISA.
Private Sub AddColumn()
Dim c As Column
Set c = DataGrid1.Columns.Add(DataGrid1.Columns.Count)
With c
.Visible = True
.Width = 1000
.Caption = "type"
.DataField = CODES.Recordset.Fields("CODE").Name
'if i use .DataField = DISA.Recordset.Fields("WHATEVER").Name it
'puts the values from 'WHATEVER' into the column "type"
.Alignment = dbgRight
End With
DataGrid1.ReBind
End Sub
Any ideas?? Thanx in advance.
Set DataGrid.Column Value
Hi,
ive got a Problem with my data grid, i have a DataGrid where the Data Source is an DataEnvironment, allright it works, but now i want do add a column to that grid where i calculate fe: Column1 * Column2 but if i want to insert the value in the column with: DG.Columns(3).Value an error apears:
Column not found, |1
what have i to do to do that???
Column In Datagrid
Hi,
I have a datagrid that bind to a table. Some of the columns of the table are not editable. For those columns in the datagrid, I want to gray them out.
The datagrid property does not give enough tools for me to set up.
Please show me how.
Thank you,
Quang
Datagrid Column
On a form I have a datagrid...how do i specify the column width for each seperate column??
Datagrid Column
I don't want my identity column to show up in my datagrid. How do I control which columns I want visible and which ones I don't?
How To Add Column To Datagrid
Anyone know how to manually add a column to a datagrid.
The default value of the grid when you create the object is to only have two columns, I need 13. Thanks
Nightfox02
Datagrid Column Sum
I have a column in datagrid that displays all the prices. I want to sum up all the values from all the rows of that column and display it as a label. How can I sum up the data??
Thanks ... Bhavesh
Add Column To DataGrid
I am new to working with grids and cannot figure out how to add a column.
The grid is a DataGrid ActiveX Contol - Version 6.0. I can look at the
properties and code but cannot see where to add the column.
I appreciate your help.
Kevin
Add A Column In A Datagrid
I would like to know if it is possible to add a column in a datagrid.
I would like to have a column to describe all line in my datagrid.
By the way, is it possible to display a long text in the header on two line but in the same cell.
For example I have the text "this is my new cell"
And I would like that it display like that:
"this is my
new cell"
because I don't want that my columns have a width of 4000
Thanks in advance
How To Add A New Column Into A Datagrid ?
Hi,
I have a datagrid1 on my screen. I have a recordset myRst contains 3 fields (id, name, age). I set myRst as the datasource for my datagrid.
set DataGrid1.datasource = myRst
Then I want to add a new column into this datagrid1, which can show info depend on the value of AGE. for example, if age < 12, show 'KID'; if 13 <= age <= 25, show 'Tenage'....
DataGrid1.Columns.Add (3)
DataGrid1.Columns(3).Width = 350
DataGrid1.Refresh
Now i want to populate this new column using following code:
myRst.movefirst
do while myrst.eof = false
with datagrid1
if .columns(2).value < 12 then
.columns(3).value = "kid"
......
end if
end with
myrst.movenext
loop
When i ran the program, first 3 columns populuated successfully, but last column is empty, and I got following error:
Column not found, /1
What does this mean?
Grace
How To Get The Column Name Of Datagrid
Is there anyone know how to get the number of columns and its corresponding name of datagrid and put it in list box or variable.
Or there's another option except datagrid which get the field name of a table.
Note: I only knew the name of the table but i dont know its field name.
Thank you very much for your reply.
Datagrid Column Sum
I am trying to find a way to sum the values of a column in my datagrid. I have not even found a way to isolate a single cell, row coordinate. Please help.
Datagrid Column Sum
I have a column in datagrid that displays all the prices. I want to sum up all the values from all the rows of that column and display it as a label. How can I sum up the data??
Thanks ... Bhavesh
Datagrid Column Sum
I have a column in datagrid that displays all the prices. I want to sum up all the values from all the rows of that column and display it as a label. How can I sum up the data??
Thanks ... Bhavesh
Changing Color In Flexgrid For Multiple Row/column Selections?
I have searched three forums for some code to help me change the celbackcolor of a flexgrid. What I want to do is when the user selects one or multiple rows/columns and clicks a cmdButton color the selected cell/cells. I can get it to color one cell but I can't get it to color multiple cells. If anyone can provide the code or a place where I can get the code. It would be much appreciated. Here is the code I have so far. THX
Private Sub cmdBlock_Click()
With MSFlexGrid1
.ColSel = .Col
.RowSel = .Row
.CellBackColor = vbYellow
End With
End Sub
Changing Font Color In A Muli-Column LisBox
I have a ListBox with multiple columns. Is it possible to change the forecolor of an item in the first column? What I would like to do is, when a user selects a row and makes a modification to it, the color of the first column item changes.
Thanks
Stan
ListView's Column Headers Text Color (URGENT!!)
Hi,
I need to find out a way to change the fore color of the text in the column header of a list view. So, if anyone knows anything about it, or has the code to do the same, please hit me back soon as this is really urgent.
Thanks a lot in advance.
Bye
DataGrid Column Width Value?
In this expression...
DataGrid.Columns.Item(iCol).Width = 1000
What type is '1000'?
Is it a Pixel, char...number.....etc....i cant figure it out......
the reason for this is I have a MSflex grid which has a column width of 20...i would like to know how to convert that number to the equiv in a datagrid..Please any help would be great. Thanks in advance
Datagrid Column Control
I want to remove the column in my datagrid that shows the ID. How do you control which columns are visible?
Datagrid Column Width ????
I have two datagrids that are exactly the same. The only difference is that I am using them on different forms, and one of them has a filter.
My question is this.
On the first datagrid, I could write column widths like this
AppointmentsDataGrid.Columns("time").Width = 40
AppointmentsDataGrid.Columns("patient").Width = 150
AppointmentsDataGrid.Columns("Doctor").Width = 150
AppointmentsDataGrid.Columns("status").Width = 50
and the output was as I expected.
but then, on the second grid, when I write the same thing, the column widths get rediculously small. Is there a way of specifying the units used for the column widths that I have missed?
Jagdip
DataGrid - Format Of One Column
Set grdStock.DataSource = Adodc1
grdStock.Refresh
grdStock.Columns(0).Width = 900
grdStock.Columns(1).Width = 1700
grdStock.Columns(2).Width = 1700
grdStock.Columns(3).Width = 1700
grdStock.Columns(4).Width = 1700
rdStock.Columns(4).DataFormat = FormatCurrency(Price)
So I want to make column(4) with Format Currency. I tried this but does not work. Does anybody have idea how I can make this format in DataGrid?
Thanks,
Ilimax
Datagrid Column Question
I have a datagrid and would like all the cells in the first column to be "RECEIVE".
I've tried
DataGrid1.columns(0).text = "RECEIVE"
AND
DataGrid1.columns(0).value = "RECEIVE"
Neither worked
I was reading something about the DefaultValue property in my vb book that seems would work for my problem but ofcourse it has no examples. I also looked it up on the MSDN and it talks about using a Tag property, which I dont know how to use.
Datagrid Column Widths
I am using a datgrid, and looking for a way to "autosize" the column widths. Is this possible, or do I need to know the lenth of my data in order to set the column width?
Thanks
|