Use another loop for days inside for each ui element…and create a datatable with 7 columns called dt
If the day is 1…that is index = 1 in if condition…index is the properly in for loop(add a variable to it)…then use add data row with {statusButtonValue,"","","","","",""}
Then on the else side of if…use assign dt.Rows(dt.RowCount-1) = statusbuttonvalue
Assuming statusbutton value is the one which is getting eqch value to be assigned in columns…if it is something else then change accordingly