Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
DataGridView绑定到DataSet一个. 假设此示例只有一列。1 列是文件名。对于每一行,我需要打开FileOpenDialog以更改或更新文件名列。如何添加按钮?它必须在单独的列中还是可以在同一列中?
DataGridView
DataSet
FileOpenDialog
添加另一个未绑定的列并用于DataItemTemplate为每一行添加按钮。在Button_Click事件中,打开FileOpenDialog并且在打开时您可以传递同一行第 0 列中的文件名的值。
DataItemTemplate
Button_Click