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!