2020-05-10

DevExpress+Winform(四)

DevExpress+Winform(四)


视频:https://www.bilibili.com/video/BV15x411x7WN?p=5

新建Devexpress Winform BlankApplication。

添加GridControl,Change View为LayoutView。

 

添加LayoutViewColumn,设置Caption和FieldName,设置AllowEdit=false。

 

 

 后台绑定数据:

private void Form1_Load(object sender, EventArgs e){ DataTable table = new DataTable(); table.Columns.Add("UserID"); table.Columns.Add("UserName"); table.Columns.Add("RoleNumber"); table.Columns.Add("UserStatus"); table.Rows.Add("111", "林玉","123","Y"); table.Rows.Add("112", "林柋","123","Y"); table.Rows.Add("113", "林紫","123","Y"); table.Rows.Add("114", "林梓","123","Y"); this.gridControl1.DataSource = table;}  

 

隐藏HeaderPanel。设置固定的展示方式。

 

 

添加一列,并设置为图片控件。

 

 

拖动,设置布局

 


No comments:

Post a Comment