Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Customising a column in a datagrid

Customising a column in a datagrid

From: Simon Harvey <nothanks_at_hotmail.com>
Date: Sat, 8 Mar 2003 16:44:23 -0000
Message-ID: <b8paa.11310$Vx2.853783@wards>


Hi there everyone,

I'm wondering if there is an easy way to change the style of just one column in a Windows Forms DataGrid? All I want to do is to a column to look like a check box for boolean values. I tried to copy the following code in the hope that it would just change the one column named. Can anyone spot if I've done something wrong with the code, or is my whole approach of only trying to change one column wrong.

I'm really really hoping that i dont have to build the whole datagrid up from scratch, as those are the only other examples I've seen apart from this code which i got from the MS site itself:

DataGridTableStyle tableStyle = new DataGridTableStyle(); DataGridColumnStyle columnStyle = new DataGridBoolColumn(); tableStyle.MappingName = "authors";
columnStyle.MappingName = "contract";
columnStyle.HeaderText = "Contract";
tableStyle.GridColumnStyles.Add(columnStyle); testGrid.TableStyles.Add(tableStyle);

I'd really really appreciate any advice.

Thanks in advance

Simon Received on Sat Mar 08 2003 - 10:44:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US