|
-
Sep 13th, 2005, 10:22 AM
#1
Re: datagrid column color
-
Sep 13th, 2005, 10:51 AM
#2
Thread Starter
Hyperactive Member
Re: datagrid column color
still do not get it.
My column is unbound checkbox style, like this:
VB Code:
Dim col As DataColumn = New DataColumn
col .DataType = System.Type.GetType("System.Boolean")
col .AllowDBNull = False
col .ReadOnly = False
col .Caption = "col 1"
coll .ColumnName = "col 1"
ds.Tables(0).Columns.Add(col )
-
Sep 13th, 2005, 11:16 AM
#3
Re: datagrid column color
If I understand well, you have a DataSet in witch you create manually a Boolean Column. Then I guest you bound the DataSet to the datagrid, is that right ?
Well the usual technique to change color for DataGrid Column is by overriding the Paint event from the DataGridTextBoxColumn or DataGridBoolColumn.
-
Sep 13th, 2005, 11:53 AM
#4
Thread Starter
Hyperactive Member
Re: datagrid column color
yes, I do have a dataset to bound with the grid. but the boolean column is not from the dataset, it is something else I append to that grid.
-
Sep 13th, 2005, 12:21 PM
#5
Re: datagrid column color
I think I miss something...
The code that you show me above, add a column to your DataSet, right ? So is this column is the one that you wish to add some color?
-
Sep 13th, 2005, 12:25 PM
#6
Thread Starter
Hyperactive Member
Re: datagrid column color
My first 2 columns are from a dataset, then I use the above code to append one more column.
-
Sep 13th, 2005, 12:29 PM
#7
Thread Starter
Hyperactive Member
Re: datagrid column color
all I want to do is to make some visual changes, like highlight that column, change border of that column or something on column header, etc, to let the user know that he is selecting this datagrid column.
-
Sep 13th, 2005, 12:36 PM
#8
Re: datagrid column color
 Originally Posted by Palmtree
My first 2 columns are from a dataset, then I use the above code to append one more column.
OK, So you have a DateSet with three Column. Boudned to a DataGrid and you want to add some color to one or more of those column. Is that right ?
If so then, add a DataGridTableStyle to your DataGrid with 3 DataGridColumnStyle to it, and you will have to Overrides the paint event from the Column that you wish to add some color.
You may refer to the point 5.14 and/or 5.32 for this page
http://www.syncfusion.com/FAQ/Window...44c.aspx#q787q
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|