datagridview中标签和数据源之间的差异? [英] Differences between tag and datasource in datagridview?

查看:73
本文介绍了datagridview中标签和数据源之间的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

i看到人们将数据绑定到gridview使用标签或数据源。

i想知道是否存在任何差异。

有吗?他们是什么?

谢谢



我的尝试:



谷歌搜索

.tag .datasource gridview

hi all.
i have seen seen people for binding data to gridview use either tag or datasource.
i want know if there are any Differences.
are there? and what are they?
Thanks

What I have tried:

Google search
.tag .datasource gridview

推荐答案

WHOLE控件的绑定只能通过数据源进行:如何:将数据绑定到Windows窗体DataGridView控件 [ ^ ]



除了绑定之外,此控件的每个单元格/行/元素都有一个标记。

这是可以在这一个元素中存储一些信息,例如字符串或整数。
Binding of a WHOLE control is ONLY via datasource possible: How to: Bind Data to the Windows Forms DataGridView Control[^]

Apart of binding, every cell / row / element of this control CAN have a tag.
This is the possibility to STORE in this one element some information like e.g. string or integer.


Tag属性用于存储单个数据,如值或对象。它从未用于将网格绑定到数据。
The Tag property is just there to store a single piece of data, like a value or an object. It's never used to bind a grid to data.


这篇关于datagridview中标签和数据源之间的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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