简体   繁体   中英

Binding DataGridView to a list of various obects? c#

Let say I'll create a DataGridView with four columns of types TextBox, Button, ComboBox, and Link. How would I populate something like this?

Check out the DataGridView.Rows property .

From MSDN:

You can use the Rows collection to manually populate a DataGridView control instead of binding it to a data source.

我实际上在这里找到一个示例: http : //msdn.microsoft.com/en-us/library/y0wfd4yz.aspx我很惊讶地发现很难找到这样的示例:-/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM