把這個屬性脩改城這個AutoGenerateColumns="False"
解决方案 »
- 我想做一个功能不知道是什么名字, 请高手帮帮我.
- treeview节点内容拖动到DatagridView
- 急,在线等!我的程序在服务器里iis里不论点击浏览那个页面都出现Bad IL format. 请问原因是什么???
- 为什么事件中要objet sender
- 关于StreamReader的问题
- 请教热心人,如何实现一个计算器+/-按钮?
- 请问一个打印设置的问题
- 用c#做web页面时怎样使用treeview控件(首先我下载了microsoft.web.ui.treeview安装之后,但在添加工具箱时却找不到这个控件)
- 一个注册表中的问题(急!!!)
- 如何在c#里加自己的资源文件
- 如何取出从表中的数据?
- 数据集主从表关系问题,急
那我该怎么设置中文名呢?To reformer((问自己最不懂的问题)):
我不能改成中文,因为代码中很多地方都得改到了。
DataGridTableStyle ts = new DataGridTableStyle();
ts.MappingName = "Customers";DataGridTextBoxColumn col1 = new DataGridTextBox();
col1.HeaderText = "ISBN";
col1.MappingName = "ISBN";DataGridTextBoxColumn col2 = new DataGridTextBox();
col2.HeaderText = "书名";
col2.MappingName = "Name";...ts.GridColumnStyles.AddRange(new DataGridColumnStyle[]{col1, col2, ...});this.dgInputBuffer.TableStyles.Add(ts);this.dgInputBuffer.SetDataBinding(this.customerTable, "");
ts.MappingName = "Customers"; DataGridTextBoxColumn col1 = new DataGridTextBoxColumn();
col1.HeaderText = "ISBN";
col1.MappingName = "ISBN"; DataGridTextBoxColumn col2 = new DataGridTextBoxColumn();
col2.HeaderText = "书名";
col2.MappingName = "Name"; DataGridTextBoxColumn col3 = new DataGridTextBoxColumn();
col3.HeaderText = "出版社";
col3.MappingName = "Publisher";
DataGridTextBoxColumn col4 = new DataGridTextBoxColumn();
col4.HeaderText = "作者";
col4.MappingName = "Author"; DataGridTextBoxColumn col5 = new DataGridTextBoxColumn();
col5.HeaderText = "一级编号";
col5.MappingName = "Index1"; DataGridTextBoxColumn col6 = new DataGridTextBoxColumn();
col6.HeaderText = "二级编号";
col6.MappingName = "Index2"; DataGridTextBoxColumn col7 = new DataGridTextBoxColumn();
col7.HeaderText = "价格";
col7.MappingName = "Price"; DataGridTextBoxColumn col8 = new DataGridTextBoxColumn();
col8.HeaderText = "入库数量";
col8.MappingName = "Number"; ts.GridColumnStyles.AddRange(new DataGridColumnStyle[]{col1, col2, col3, col4, col5, col6, col7, col8});
this.dgInputBuffer.TableStyles.Add(ts); this.dgInputBuffer.SetDataBinding(this.customerTable, ""); this.dgInputBuffer.DataSource = new DataView(this.customerTable);