标签:
新建窗体 拖一个Gridcontrol 添加两列 col1,col2
public partial class XtraForm2 : DevExpress.XtraEditors.XtraForm { public XtraForm2() { InitializeComponent(); } private void XtraForm2_Load(object sender, EventArgs e) { //设置复选框 gridView1.OptionsSelection.MultiSelect = true; gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect; //绑定数据源 List<object> list=new List<object>(); list.Add(new {col1="test",col2="test"}); list.Add(new {col1="test",col2="test"}); list.Add(new {col1="test",col2="test"}); list.Add(new {col1="test",col2="test"}); gridControl1.DataSource = list; } }
DevExpress Gridcontrol 表格头复选框 全选全不选
标签:
原文地址:http://blog.csdn.net/zhishiheng/article/details/43277541