在C#windows应用程序中绑定Datagrid视图 [英] Bind Datagrid view in C# windows applications

查看:101
本文介绍了在C#windows应用程序中绑定Datagrid视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生,



我有一个表格,其中包含像head和fields这样的列,head列中的值类似于a,b,c,d和in fields列就像10,20,30,40当我绑定数据时,它显示a,b,c,d在一列中,10,20在另一列中我希望头部成为头文本,并且在这些头中显示的值可以有人告诉怎么做。

Dear Sir,

I have a table which have the columns like heads and fields and values in heads column are like a,b,c,d and in fields column are like 10,20,30 ,40 when i bind data it shows a,b,c,d in one column and 10,20 in another i want the heads become the header text and values shows in these heads can anbody tell how to do it.

推荐答案

1-获取数据源后,右键单击数据集并转到QuickWatch

2-如果演示表格不是您在网格中所需的,然后使用另一个辅助数据(Set / Table或View)对象重新排列它们。

3-重新排列数据后,将更新的源分配给你的网格。
1- After getting datasource, Right click your Dataset and go to QuickWatch
2- If the presentation of table is not as you require in your grid then re-arange them using another helper Data(Set/Table or View) object.
3- After re-aranging of the data then assign the updated source to your grid.


这篇关于在C#windows应用程序中绑定Datagrid视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆