社区
C#
帖子详情
DataGridTableStyle失效问题
huockham
2006-08-01 02:47:14
在winform程序里定义了一个DataGrid dg,从数据库中读出数据填入其中。
在程序里面定义了一个DataGridTableStyle ts;然后用dg.TableStyle.Add(ts)
程序倒是没有报错。但似乎加不加这句话对我运行的结果没有影响。
为什么我的DataGridTableStyle会无效啊?求各位达人指点!谢谢!
...全文
167
3
打赏
收藏
DataGridTableStyle失效问题
在winform程序里定义了一个DataGrid dg,从数据库中读出数据填入其中。 在程序里面定义了一个DataGridTableStyle ts;然后用dg.TableStyle.Add(ts) 程序倒是没有报错。但似乎加不加这句话对我运行的结果没有影响。 为什么我的DataGridTableStyle会无效啊?求各位达人指点!谢谢!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
huockham
2006-08-01
打赏
举报
回复
原来是我的mappingName和tableName名称未一致!多谢jc15271149(接分接到★)
aSalt
2006-08-01
打赏
举报
回复
不会吧
jc15271149
2006-08-01
打赏
举报
回复
DataGridTableStyle DgStyle = new DataGridTableStyle();
DgStyle.MappingName =dt.TableName;
DataGridTextBoxColumn DgTextBoxC1 = new DataGridTextBoxColumn();
DgTextBoxC1.MappingName = "id";
DgTextBoxC1.HeaderText = "序号";
DgStyle.GridColumnStyles.Add(DgTextBoxC1);
datagrid.TableStyles.Add(DgStyle);
DataGrid
Table
Style
.txt
DataGrid
Table
Style
.txt
DataGrid
Table
Style
.txt
C#开发和使用中的23个技巧
<br>
DataGrid
Table
Style
dgts = new
DataGrid
Table
Style
(); <br> dgts.MappingName = "my
Table
"; //my
Table
为要载入数据的Data
Table
<br> <br>
DataGrid
TextBoxColumn dgcs = new ...
C#窗体控制程序电话本
DataGrid
Table
Style
ts1= new
DataGrid
Table
Style
(); ts1.MappingName="BasicInfo";
DataGrid
Column
Style
cs = new
DataGrid
TextBoxColumn(); cs.Alignment=HorizontalAlignment.Center; cs.MappingName="SName";...
浅谈
DataGrid
Table
Style
心得
在开发数据
DataGrid
显示时候通常会遇到自定义
DataGrid
的列显示, 比如经常会提到的, 如何单击一行显示某种颜色 ...此类
问题
归根到底还是要靠
DataGrid
Table
Style
和 System.Windows.Forms.
DataGrid
ColumnSt...
DataGrid
Table
Style
DataGrid
Table
Style
member
Table
= new
DataGrid
Table
Style
(); member
Table
.MappingName = typeof(List).Name;
DataGrid
TextBoxColumn priceColumn = new
DataGrid
TextBoxColumn(); priceColumn.Alignment =...
C#
110,535
社区成员
642,577
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章