Error: when binding the datatable with datagrid

viatorg

New member
Joined
Jun 11, 2004
Messages
2
Programming Experience
1-3
Hi again,

I'm still getting this error when I bind the datagrid with a Datatable:

A first chance exception of type 'System.IndexOutOfRangeException' occurred in system.windows.forms.dll
Additional information: Index was outside the bounds of the array.



I have noticed if I keep the Readonly = false on the datagrid I don't get the error.
I need it to equal true though.

please help

thanks
Gerry
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
That's odd. Could you post some (the relevant part) of your code? Perhaps someone here could find the problem.
 

viatorg

New member
Joined
Jun 11, 2004
Messages
2
Programming Experience
1-3
I figured out the problem,

I was trying to update a datatable that was bound to a datagrid, which
readonly property was set to true. So I just changed in my procedure
before I add any rows I first change that property to false then
change it back when I am finished. du...

thanks
Gerry
 
Top Bottom