throw ArgumentOutOfRangeException when add new row RRS feed

  • Question

  • Hi all

    I have a problem, when i call method Add (MyDataSet.DTProject.Rows.Add(row)) in DataRowCollection, i got an exception the ArgumentOutOfRangeException.

    Message summary:  Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

    StackTrace:    at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.RemoveAt(Int32 index)
       at System.Data.RecordManager.NewRecordBase()
       at System.Data.DataTable.NewRecord(Int32 sourceRecord)
       at System.Data.DataRow.BeginEditInternal()
       at System.Data.DataRow.set_Item(DataColumn column, Object value)

    Friday, June 5, 2015 3:00 AM

All replies