How to create boolean column (WPF DevExpress Grid)
does anyone knows how to create a boolean column for WPF DevExpress开发者_高级运维 Grid. A similar text column is generated like:
DevExpress.Wpf.Grid.GridColumn col = new GridColumn();
But how to create a boolean column, so that the check box would be appear on that column..?
When you set the fieldname of that column to a boolean member of your data object it automatically present a checkbox
so say you have
class MyObj
{
public bool MyProperty {get;set;}
public string OtherProperty {get;set;}
}
you then do:
DevExpress.Wpf.Grid.GridColumn col = new GridColumn();
col.FieldName = "MyProperty";
精彩评论