For next loop with DB GRID
-
Hi all, I would like to use a for next loop with a Datagrid. I have 2 grids in my form. Dbgrid1 and Dbgrid2 In my Dbgrid1 I have 2 cols Col1 has 2A 3B 4C Col2 Has 10 20 30 I want to calculate the total on Col2 using For next eg: for i = 0 to 2 Total = Total + current(col2) next Then: Insert the total in the first row of the second col of my second datagrid: Can some one give me the code. Tnx
-
Hi all, I would like to use a for next loop with a Datagrid. I have 2 grids in my form. Dbgrid1 and Dbgrid2 In my Dbgrid1 I have 2 cols Col1 has 2A 3B 4C Col2 Has 10 20 30 I want to calculate the total on Col2 using For next eg: for i = 0 to 2 Total = Total + current(col2) next Then: Insert the total in the first row of the second col of my second datagrid: Can some one give me the code. Tnx
-
Sounds like Homework !!!! how are you filling the grids in the first place? a database?, from code? Help is great only if you ask correctly :)