generate thead tr from model