In your code you have the following fragment:
private DataTable m_dt;
int index;
CheckBox chk = null;
foreach (DataRow dr in m_dt.Rows)
.
.
.
Since you're not setting m_dt you have no data (in fact, you don't have m_dt so it should fail with "object not set to an instance" error. Definitely, your for each here will NOT trigger and all the code inside it will never execute.
So, remove the outer for each and it should work.
If this helps please take time to accept the solution. Thank you.