Prev: force the form to be made visible in the Load event handler
Next: Error while launching Cab in Windows CE
From: David McCallum on 16 Mar 2010 15:06 Given the code below, what changes are needed to show only the current and name fields on the grid, also to show the Boolean field as a checkbox. TIA David McCallum class Person{ public int ID { get; set; } public string Name { get; set; } public DateTime DateOfBirth { get; set; } public bool Current { get; set; } } public MyForm() { InitializeComponent(); List<Person> sessions=new List<Person> { new Person() { ID = 1, Name = "person", DateOfBirth = DateTime.Now, Current = true } }; }
From: TWischmeier on 17 Mar 2010 05:09 You might want to take a look at the property DataGrid.TableStyles as well as the classes DataGridTableStyle and DataGridColumnStyle. You use the latter to detemine which columns are visible. To display a checkbox column, you have to create your own DataGridColumnStyle which draws a checkbox. I am currently working at this, so if you remind me again in a couple of days I can give you my solution for this. On 16 Mrz., 20:06, "David McCallum" <dmacukREM...(a)THISblueyonder.co.uk> wrote: > Given the code below, what changes are needed to show only the current and > name fields on the grid, also to show the Boolean field as a checkbox. > > TIA > > David McCallum > > class Person{ > public int ID { get; set; } > public string Name { get; set; } > public DateTime DateOfBirth { get; set; } > public bool Current { get; set; } > > } > > public MyForm() > { > InitializeComponent(); > List<Person> sessions=new List<Person> > { > new Person() > { > ID = 1, > Name = "person", > DateOfBirth = > DateTime.Now, > Current = true > } > }; > > }
From: Rüdiger Kardel on 21 Mar 2010 16:05 David, this link may be useful: http://www.ehartwell.com/InfoDabble/DataGrid_extensions_for_the_Compact_Framework Regards Ruediger
From: David McCallum on 22 Mar 2010 02:00
Ruediger Thanks, I'll look into it. David |