开发者

How to use BindingSource with not 1 to 1 set of columns between the list and the DataGridView

I have the following situation working with winforms:

  1. I defined a DataGridView with X columns.
  2. 开发者_如何学Python
  3. Bind it to a list containing X-1 columns

    dataGridViewMain.DataSource = _bindingSource; _bindingSource.DataSource = _currentMediaItems;

  4. After a while I update the list and when performing the following call: _bindingSource.DataSource = _currentMediaItems; I get the following error : "At least one of the DataGridView control's columns has no cell template."

Someone can help with a workaround?

thanks!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜