Datagrid Update

MoonNight
MoonNight used Ask the Experts™
on
Hi!

I would like to know how I can change the value of a cell in the datagrid using the program in VB.NET.

I tried this:
For Counter = 0 To (datagrid.VisibleRowCount - 1)
        datagrid.Item(Counter, 2) = datagrid.VisibleRowCount.ToString
Next


But it returned this in runtime:
An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll
Additional information: The ListManager's position must be equal to rowNum.

Thank you for the help in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial