tabledrag submit - $form_state missing values
The answer is quite simple - markup doesn't make it into $form_state. Place the item id ($entity->ref in the below code) in a textfield or number field instead and use the following to hide and disable it (not sure if disabling is necessary):

    $form['mytable'][$id]['label'] = array(
    //'#plain_text' =&gt; $entity-&gt;ref,
    '#type' =&gt; 'number',
    '#title' =&gt; "",
    '#default_value' =&gt; $entity-&gt;ref,
    '#disabled' =&gt; TRUE,
    '#access' =&gt; FALSE,