Tableselect Form API - How to delete/edit selected rows from tableselect

To delete/edit selected rows from tableselect and have something to work in in form_state you should add keys to your array in your form like:

  $rows = array();
  foreach($fullList as $line)
  {
     $rows[$line->category] = array(
    'tid' => $line->category,
    );
  }

This way you will be able to easily retrieve values on your submit/delete handler on $form_state

  foreach ($form_state['values']['table'] as $rows) {
            $delete = db_delete('htb_if_categories')
                    ->condition('category', $rows, '=')  
                    -> execute();
    }