mike Delvotti

mike Delvotti

  • NA
  • 262
  • 0

add new rows on sum output

Aug 6 2013 1:17 PM
Guys, I will try to explain this without being too confusing.

I need to add new rows in my datagridview based on a sum output.

Example, I have a textbox and 6 labels that each have a fixed value.

If the entered value in textbox is less than or equal to label1 it adds a new row in datagridview and inserts todays date in row.cells[2] of that new row.

Now, if the value in textbox is greater than label1 value it adds 2 new rows and inserting date value in cells[2] in new rows.

Now it gets tricky, if the textbox value is greater than label1 + label2 value it adds 4 new rows with the date value in cell[2] etc. this need to happen until the value has reached the value on all 6 labels.

is it actually possible to do? the above would fire from a function or button click.

Answers (14)