Click here to Skip to main content
15,902,777 members

Comments by Member 14904307 (Top 11 by date)

Member 14904307 24-Jul-21 17:33pm View    
if the count start by 0 , the count limit for 10 columns is 9, The problem is why the iteration continues after reaching that limit.
Member 14904307 24-Jul-21 17:28pm View    
columncount indicated by the debugger is 10 and columncount-1 is 9 .the limit specified in the block is 9
Member 14904307 24-Jul-21 17:16pm View    
note that when the variable i exceeds the value 9 and takes value 10, the program stops and the message index was out of range.... occurs.Normally the variable i should not exceed the value 9.
Member 14904307 24-Jul-21 17:03pm View    
Dear OriginalGriff, I have used the vs debugger and I found that when the variable i (see in the do while loop block) reached the value 9, the iteration continued instead of to exit the do while loop block as indicated in the block. The variable i continues to iterate ,taking the value 10 that is greater than 9 (limit of the iteration allowed by the block). but why the variable don't stop at the allowed limit of 9 (datagridview1.columncount-1)
Member 14904307 24-Jul-21 15:49pm View    
Dear Richard, I have changed form1.datagridview1 to TrsfDgv1 but the problems persists. There is any problem when transferring data from TrsfDgv1 in form1 to datagridview1 in form2. The problem occurs when running the block Do while ...loop in the last part of the code