Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Customising a column in a datagrid
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