|
如题,wince下,datagrid或listview都好像不好用
下面的代码就显示不了表头
- lv.Left = 0;
- lv.Top = 0;
- lv.Width = 700;
- lv.Height = this.ClientRectangle.Height;
- //lv.GridLines = true;
- lv.FullRowSelect = true;
- lv.View = View.Details;
- //lv.Scrollable = true;
- //lv.MultiSelect = false; // 不可以多行选择
- lv.HeaderStyle = ColumnHeaderStyle.Nonclickable; // 针对数据库的字段名称,建立与之适应显示表头
- lv.Columns.Add("姓名", 60, HorizontalAlignment.Right);
- lv.Columns.Add("住宅电话", 100, HorizontalAlignment.Left);
- lv.Columns.Add("办公电话", 100, HorizontalAlignment.Left);
- lv.Columns.Add("移动电话", 100, HorizontalAlignment.Left);
- lv.Columns.Add("居住地点", 100, HorizontalAlignment.Left);
- lv.Columns.Add("工作单位", 100, HorizontalAlignment.Left);
- lv.Columns.Add("电子邮件", 100, HorizontalAlignment.Left);
- lv.Visible = true;
复制代码
|
|