I noticed that some other folks were having a similar issue, but not the same issue I am having. I am binding my RadGridView to a Generic List. When I delete the item in the Generic List and rebind the row doesn't remove until I scroll the deleted row out of view and then back into view.
The item is removed, but the physical row is still on the grid. It throws the following exception:
Sample Code to reproduce the error:
I am currently using Q1 2007 with VS2005 SP1.
Thanks for a great product and any thoughts on this.
Dennis
The item is removed, but the physical row is still on the grid. It throws the following exception:
The following exception occurred in the RadGridView: |
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. |
Parameter name: index |
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) |
at System.ThrowHelper.ThrowArgumentOutOfRangeException() |
at System.Collections.Generic.List`1.System.Collections.IList.get_Item(Int32 index) |
at Telerik.WinControls.UI.GridViewData.GetValue(Int32 boundColumnIndex, Int32 columnIndex, Int32 rowIndex) |
Sample Code to reproduce the error:
' in form load, the grid is bound to the genericList |
private sub frm_frmLoad() |
Me.radGridView.DataSource = genericList |
End Sub |
public sub RemoveItemFromList(ByVal customItemToRemove as CustomItems) |
' remove item from the List(Of CustomItems) |
If genericList.Contains(customItemToRemove) Then |
genericList.RemoveAt(genericList.IndexOf(customItemToRemove)) |
End If |
' rebind to |
Me.radGridView.DataSource = genericList |
End Sub |
I am currently using Q1 2007 with VS2005 SP1.
Thanks for a great product and any thoughts on this.
Dennis