I've a datagrid filled with a collection of objects that inherits from
basecollection.
When I remove an item from this collection and then click onto the datagrid,
I've always this error:
"Index was outside the bounds of the array datagrid"
I've tried this structure:
Dim oldList As Business.MyBaseCollection = DirectCast(dgDetails.DataSource,
Business.MyBaseCollection)
Me.BindList(Nothing, Nothing)
DirectCast(oldList, Business.MyBaseCollection).Remove(detailDeleted)
Me.BindList(oldList, Me.FatherItem)
The BindList sub set the list as datasource for the datagrid, and if the
source is not nothing assign a datagriTableStyle.
What can I do?
I've tried some refresh or update, but nothing.
thanks
|