.NET常用技术

Posted on 2013-04-15 15:49  水晶石头  阅读(228)  评论(0)    收藏  举报

一、NET常用技术:

1、获得控件的焦点:Focus();

二、NET易错问题

1、DataGridView :

 (1)DataGridView 增加标题列:

DataGridViewTextBoxColumn col1 = new DataGridViewTextBoxColumn();
col1.HeaderText = "客户";
col1.Name = "customer_name";
this.dataGridViewExInfo.Columns.Add(col1); 

 

 (2)DataGridView 增加新行: 

      

DataGridViewRow row = new DataGridViewRow();
row.CreateCells(this.dataGridViewExInfo);
row.Cells[0].Value = customer_name;
this.dataGridViewExInfo.Rows.Add(row);

 

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3