C# datagridview argument out of range exception -



C# datagridview argument out of range exception -

i have datagridview , trying add together new row it. has 3 columns, 0 = image, 1 = text, 2 = text.

it adds first row fine, when click 1 time again add together sec row throws exception.

datagridviewrow row = new datagridviewrow(); datagridview.rows.add(row); row.cells[1].value = message; //specified argument out of range of valid values. row.cells[2].value = response;

//try : datagridview.rows.add(null,message,response)

c# datagridview

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -