开发者

C# Windows Form -DataGrid -DataPropertyName

What is the use of DataPropertyName in Win Form of VS?开发者_StackOverflow中文版


DataGridViewColumn.DataPropertyName Property

Gets or sets the name of the data source property or database column to which the DataGridViewColumn is bound.

When the AutoGenerateColumns property is set to true, each column automatically sets its DataPropertyName property to the name of a property or database column in the data source specified by the DataSource property. This binding can also be performed manually, which is useful when you want to display only a subset of the properties or database columns available in the data source. In such cases, set the AutoGenerateColumns property to false, and then manually add each DataGridViewColumn, setting the value of each DataPropertyName property to the properties or database columns in the data source that you want to display.


http://social.msdn.microsoft.com/Search/en-US?query=DataPropertyName+DataGridView

See DataGridViewColumn.DataPropertyName Property.


Have a look at Dev Q&A : DataGridView

DataPropertyName to identify if the column is bound and what field it is bound to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜