Display checkbox inside Table like structure in Vb
I have a field called Departments in my database. and I have 3 monitors. So when Page_Load, I need to check number of departments I have in database. And depends upon that number of departments I have, I need to calculate number of checkbox I need to display.
NumCheckBox = NumDepartments * 3
And then I need to create a table like structure with 4 fields. First column -Department Name and remaining 3 columns will be Monitor 1, Monitor 2 and Monitor 3. and display the department name and corresponding checkbox under each Monitor columns.
Each Checkbox need to be Checked and UnChecked. And I have 3 buttons on top of the screen called âFunction1â, âFunction2â and âFunction3â. If I hit âFunction1â and select the corresponding checkboxâs for each department and hit âSaveâ button, then it need to save inside a config file. And if I hit âFunction2â and select the corresponding checkboxâs for that function and save and so on.
Once its saved, if I hit any of those Function button, then the corresponding selected checkbox for that function need to be checked.
For Example :
if I hit âFunction1â button, then the corresponding selected checkbox for Function1 need to be checked.
if I hit âFunction2â button, then the corresponding selected checkbox for Function2 need to be checked.
if I hit âFunction3â button, then the corresponding selected checkbox for Function3 need to be checked.
Checkbox selected will be different for each Function. And the Number of Departments various. For Example : sometimes number of Departments will be 10 or 20 or 35 or 40 etcâ¦ so depends upon number of departments I have, I need to create checkbox under each Monitor field. And depends upon on number of department I have, the table structureâs size also should increase.
I can find the number of Departments from database and calculate the number of checkbox I need to display. And I have 3 Function button and Save button.
Can you please help me to find a way to create this table like structure to display the department name and the Checkboxâs under each Monitor field?
If you have any idea how to do this, please help me.
Thanks in advance.