The board of commissioners shall have the right and authority to employ a county attorney when necessary, his compensation to be fixed by the board [of commissioners] and paid from county treasury.