bool column style in compact framework?

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

..NET 2.0

I believe this question must have been asked many times in this forum
already. I could find it though.

I want to create a BoolColumnStyle in Compact Framework. But it seems many
many method and properties of regular framework are not available here...

whats the best way to do this?
 
to be more precise, by BoolColumnStyle i mean a column of checkboxes in
Compact Framework datagrid.

Awaiting responses...

-Andrew
 
This is what I do:

class Person
{
private bool eligibale=false;

public bool Eligable {
get
{
return eligable
}
}

// I add this bit and use a texbox column to display my label
public string Eligable_Label
{
get { return Eligable?"X":"";}
}
}

It works pretty well. Maybe not what you wanted to hear, but
certainly a workable solution.

Richard (Device Dev MVP)
 
Thanks Richard for your help.

I will attempt your suggestion. It seems like it will 'Paint' X to look like
check box. I need actual check box so that I can handle 'CheckedChange' kind
of event. I dont seem to find the 'inner' TextBox of the
DataGridTextBoxColumn also... its unlike the regular framework...

I am starting to arrive to a conclusion that the CompactFramework data grid
and its extention systems (DataGridColumnStyle) are too too limited to be of
any use really... like we cant implement a good DataGridBoolColumn which is
in regular framework (and yes, the DataGridView of regular framework is much
better anyway)...

More inputs and pointers in this will be highly appreciated.

-Andrew
 
I don't know anyone who actually uses the DataGrid in there apps on the CF.
Most folks write there own controls due to the limitations and the lack of
functionality including look and feel in the standard CF UI BCL. It wouldn't
be hard to actually write you;re own control with a checkbox, trap the click
event and draw the checkbox (image) on of off.
 
Back
Top