Home Forums WinForms controls Xceed Grid for WinForms Clearing the grid Reply To: Clearing the grid

User (Old forums)
Member
Post count: 23064

Oops, silly mistake on my part. However, even with the 0 instead of i, I get the same Exception. It must be something I’m doing, but the only code being run when I clear the grid is the code I pasted (after fixing the above-mentioned error).

{System.ArgumentOutOfRangeException}
[System.ArgumentOutOfRangeException]: {System.ArgumentOutOfRangeException}
Object: {System.ArgumentOutOfRangeException}
_COMPlusExceptionCode: -532459699
_className: Nothing
_exceptionMethod: Nothing
_exceptionMethodString: Nothing
_message: “The index must be greater than or equal to 0 and less than Count.”
_innerException: Nothing
_helpURL: Nothing
_stackTrace: {System.Array}
_stackTraceString: Nothing
_remoteStackTraceString: Nothing
_remoteStackIndex: 0
_HResult: -2146233086
_source: Nothing
_xptrs: 0
_xcode: -532459699
Message: “The index must be greater than or equal to 0 and less than Count.
Parameter name: index
Actual value was 0.”
InnerException: Nothing
TargetSite: {System.Reflection.RuntimeMethodInfo}
StackTrace: ” at Xceed.Utils.Exceptions.ThrowException.ThrowArgumentOutOfRangeException(String paramName, Object value, String message)
at Xceed.Utils.Collections.ListBase.ListGetItem(Int32 index)
at Xceed.Grid.Collections.CellList.get_Item(Int32 index)
at Xceed.Grid.CellRow.RemoveCell(Column column)
at Xceed.Grid.DataManager.RemoveColumn(Column column)
at Xceed.Grid.GridControl.RemoveColumnFromRows(Column column)
at Xceed.Grid.Collections.ColumnList.OnRemoveComplete(Int32 index, Object value)
at Xceed.Utils.Collections.ListBase.InternalRemoveAt(Int32 index)
at Xceed.Utils.Collections.ListBase.InternalRemove(Object value)
at Xceed.Utils.Collections.ListBase.ListRemove(Object value)
at Xceed.Grid.Collections.ColumnList.Remove(Column value)
at xceedwrklst.Form1.ClearGrid() in C:\misc\xceedwrklst\xceedwrklst\Form1.vb:line 363″
HelpLink: “”
Source: “Xceed.Grid”
HResult: -2146233086

Imported from legacy forums. Posted by Paul.Chernyakov (had 720 views)