0

EDIT

I need to fill a datagridview with all possible combinations of an array of 5 numbers which has range from 1 to n. (n lets say 100). My datagrid columns are Number1, Number2 Number3, Number4, Number 5.

I have read this What is the best way to find all combinations of items in an array?

but I need to do the calculation on a button click and then fill the datagridview. Is that possible? thank you!

touinta
  • 971
  • 3
  • 10
  • 26

1 Answers1

-1

The best way to fill datagridview is just by binding it to a dataTable... so if you know how to do the math... and if you know how to trigger a button click event... just build a dataTable with all the columns and rows you need and when it's ready.. just do MyDataGridView.DataSource=MyDataTable...

Idan Marko
  • 94
  • 6