Delete row from datagrid that is bound to a two-dimensional array

AsifK

New member
Joined
Aug 18, 2005
Messages
2
Programming Experience
5-10
Hi,

I have a form with a datagrid that is bound to a two-dimensional array. I did this using the method described by Microsoft's MSDN (please see the following link for details)

Binding the Windows Forms DataGrid Control to a Data Source

I have the grid working, and am able to add records to the array which are then shown on the grid. However, I need to be able to delete rows from the grid, but have not found a method to do so.

I tried using the RemoveAt method for the array, but that did not work:


visual basic code:Me.BindingContext(Array1).RemoveAt(Index)​

This returned the following error message : "An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll

Additional information: Collection was of a fixed size."

Any suggestions on how to delete rows? Thanks in advance,

AsifK
 
Hi,


Does anyone have any suggestion? Is there another method I can use to add and delete rows from an array that is bound to a datagrid? Please help!

Thanks,

AsifK
 
Back
Top