Court rules against Charleston Co. Sheriff candidate in ball