Sort by table column on header clicking.