if you are talking about datagrid in winform, take a look at5.9 How do I hide a column?
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q708qif it is for webform, try
DataGrid.Columns[n].Visible = falseit only works on template columns, if you are using auto-generated columns, you have to override the behavior in ItemCreated or ItemDataBound event handler or create a DataTable with the chosen columns
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q708qif it is for webform, try
DataGrid.Columns[n].Visible = falseit only works on template columns, if you are using auto-generated columns, you have to override the behavior in ItemCreated or ItemDataBound event handler or create a DataTable with the chosen columns
解决方案 »
- 动态编译的程序集可否被缓存?
- C#正则表达式的问题
- 通过PL/SQL insert 表的记录都查询不出来。
- [100分]怎么把InkCanvas的墨迹识别为规则的几何图形
- C#winform程序的开机启动问题
- C#开发一个更改IE主页的插件程序
- bool? 是什么类型? 不能转换为bool型
- (50分)跪求:resx資源文檔編輯器
- textBox绑定数据,使用DataSet更新数据库的问题。
- 数据bind在DataGrid这个上,我不想看见字段名或想把字段名改为其它的字符串,这该怎样办??????
- 如何把一个字符串里的html标记用一个replace替换掉?
- 如何选中checkedListBox的第二行?
你可以设置datagrid的tablestyle属性