バインディングソースにデータを入力しようとすると、エラーが1つ発生します。例外は次のとおりです。
System.IndexOutOfRangeException: Index 0 does not have a value.
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
at System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetError(Int32 rowIndex)
バインディングソースを埋めるためにジェネリックリストを使用しています。コードは次のようになります、
foreach (listItem)
{
BindingSource.Add(listItem);
}
データソースプロパティをリセットしようとしましたが、それでも同じ問題が発生します。
この問題の解決にご協力ください。