可以用:
this.dataGrid1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;其实,这句句子你可以在InitializeComponent()里面找到。另外,需要说明的是,System.Windows.Forms下面的诸多控件设置边框分格的方法各有不同,有的是设置BorderStyle属性(如DataGrid等),有的是用FlatStyle属性(如Button),有的没有内建的改变边框的方法,必须自行重画(如ComboBox)。这在编写WinForm时需要留意。
Hogwarts - S(u)ddenly dis@ppeared...

本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。  
为了为您创建更好的讨