开发者

How to create boolean column (WPF DevExpress Grid)

开发者 https://www.devze.com 2022-12-11 20:12 出处:网络
does anyone knows how to create a boolean column for WPF DevExpress开发者_高级运维 Grid. A similar text column is generated like:

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";
0

精彩评论

暂无评论...
验证码 换一张
取 消