From: David McCallum on
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
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
David,

this link may be useful:

http://www.ehartwell.com/InfoDabble/DataGrid_extensions_for_the_Compact_Framework

Regards
Ruediger
From: David McCallum on
Ruediger

Thanks, I'll look into it.

David