The record in this case presents the following history: The complaint is for the price of cigars sold and delivered by plaintiffs to defendant. Defendant answered, and admitted the sale and delivery, and set up in recoupment a contract, the terms of which were, generally, that in 1886 he was dealing *259in cigars; that plaintiffs approached him to sell their “Flor de B. Garcia Cigars,” agreeing that defendant should have the sole and exclusive right of selling, handling, and dealing in said cigars in Montana; that plaintiffs would not sell said cigars to any one else in the Territory; that defendant would cease advertising and selling various other valuable brands of cigars in which he was dealing, and from the .‘■ale of which he was deriving much profit; that he would accept said sole agency, would purchase said brand of cigars from plaintiffs, and would introduce and promote the sale thereof to the best of his ability. The answer further alleges, in detail, the performance by defendant of his part of the contract, and the expenditure of large sums of money in placing said cigars upon the market. Then follows the allegation of breach by plaintiffs, in that they sold the said brand of cigars to other dealers in the Territory, by which breach the defendant suffered great damage in his business, which damage he recoups against the plaintiffs’ account for the cigars sold. The court below sustained a demurrer to this answer on the ground that the contract pleaded was void as against public policy, being in restraint of trade, and could not be pleaded in recoupment. Defendant accepted the ruling of the court, and took leave to amend, which he did by pleading the same contract, not in recoupment, but as an absolute defense, on the ground that if the contract were void, the plaintiffs could not recover thereunder. The case went to trial in this condition, before the court without a jury. The theory of the case seems to have been preserved until the court made findings and conclusions of law, at which time he held that the contract was not void. Defendant presumably had not introduced evidence of damages by reason of breach, as he was not entitled to under the pleadings; and judgment was made and entered for plaintiffs for the amount claimed. Defendant seems not to have had a day in court. His motion for a new trial was denied. From that order, and the judgment as well, he appeals, having saved his errors complained of by exception.
"We will first construe the contract as to whether it must be considered void as in restraint of trade. The rule that contracts that are in restraint of trade shall be void, as against public policy, is among our most ancient common-law inheritances. In Alger v. Thatcher, 19 Pick. 51; 31 Am. Dec. 119, Morton, J., *260says: “As early as the second year of Henry V. (A. D. 1415), we find by the year books, that this was considered to be old and settled law. Through a succession of decisions it has been handed down to us unquestioned, till the present time.” The learned judge traces the history of the rule to its modern modification, that “contracts in restraint of trade, generally, have been held to be void; while those limited as to time or place or persons have been regarded as valid, and duly enforced.” He gives the reasons for the rule in the following language: “(1) Such contracts injure the parties making them, because they diminish their means of procuring livelihoods, and a competency for their families. They tempt improvident persons, for the sake of present gain, to deprive themselves of the power to make future acquisitions, and they expose such persons to imposition and oppression. (2) They tend to deprive the public of the services of men in the employment and capacities in which they may be most useful to the community as well as themselves. (3) They discourage industry and enterprise, and diminish the products of ingenuity and skill. (4) They prevent competition, and enhance prices. (5) They expose the public to all the evils of monopoly; and this especially is applicable to wealthy companies and large corporations, who have the means, unless restrained by law, to exclude rivalry, monopolize business, and engross the market. Against evils like these, wise laws protect individuals and the public, by declaring all such contracts void.” (See, also, cases in that opinion cited.)
The doctrine is again well stated in Lawrence v. Kidder, 10 Barb. 641, in which case the court, Selden, J., cites with approval Bronson, J., in Chappel v. Brockway, 21 Wend. 157, as follows: “ There may be cases where the contract is neither injurious to the public nor the obligor, and then the law makes an exception, and declares the agreement valid.” In Oregon Steam Navigation Co. v. Winsor, 20 Wall. 68, Mr. Justice Bradley says: “ There are two principal grounds on which the doctrine is founded that a contract in restraint of trade is void as against public policy. One is the injury to the public by being deprived of the restricted party’s industry; the other is the injury to the party himself by being precluded from pursuing his occupation, and thus being prevented from supporting *261himself and his family. It is evident that both these evils occur when the contract is general, not to pursue one’s trade at all, or not to pursue it in the entire realm or country. The country suffers the loss in both cases; and the party is deprived of his occupation, or is obliged to expatriate himself in order to follow it. A contract that is open to such grave objections is clearly against public policy. But if neither of these evils ensue, and if the contract is founded on a valid consideration, and a reasonable ground of benefit to the other party, it is free from objection, and may be enforced.”
We have cited these reasons for the rule in full, in order to apply them to the contract under construction. They embody the modern doctrine, as held by the authorities. A recitation alone, of the rule and its reasons, seems to us sufficient to take, the contract under consideration out of the operation of its prohibitions. The contract is not general; it is limited as to place and person. The public is not deprived of the alleged restricted party’s industry. On the contrary, the contract provides for the placing upon the Montana market the product of the plaintiffs’ industry, by the selection and services of a local Montana agent, interested in the success of sales, and to be rewarded by such success. Nor is there any injury to the party himself, the plaintiffs, by their being precluded from pursuing their occupation. Bather, by the contract, they seem to have sought a means of extending the field of their operations, and not of restricting them. In the light of the authorities, the rule and the- reasons therefor, and the facts, we are clearly of the opinion that the contract was not in restraint of trade, and not void. It was simply a contract, for a consideration, for the enlistment of the services of an agent for the plaintiffs in their business. The court below was therefore correct in his last view of the contract. It follows that he was wrong in his first position in sustaining the demurrer to the original answer.
Bespondent urges that all the proceedings and pleadings, prior to the amended pleadings, on which the case was tried, are dehors the case on appeal; citing Sawyer, J., in Barber v. Reynolds, 33 Cal. 501: “The old complaint, in the form first filed, ceases to be the complaint in the case, or to perform»any further function as a pleading, but the amended complaint falls *262into its place, and performs the same, and not different functions.” Upon an examination of this case, we find the judge farther saying: “The identity of the action is in no respect affected;” and it was preliminary to arriving at the conclusion last quoted that the previous utterance was made. The law, as counsel cites it, is true, as far as he goes. The old answer in the case at bar does not'“perform any further function as a pleading;” but we are not precluded from examining that answer, and the sustaining of the demurrer thereto, for the purpose suggested infra. We are mindful of the consequences of defendant answering over, after demurrer sustained (Francisco v. Benepe, 6 Mont. 243), and we, at this time, recur to that ruling, and review the same, not as if an appeal had been taken therefrom to this court, but for the purpose of ascertaining' whether the court in such decision, together with his latter reversal of his position, in the same case, did not deprive defendant of a substantial right, and exclude him from his day in court. If that be true, defendant has a remedy. Ubi jus, ibi remedium. If the contract be valid, defendant certainly has the right to recoup his damages. If the contract be void, defendant has the right to plead it in bar. But the court below changed front as often as defendant aligned himself with the court’s last evolution. It was impossible for the defendant to keep pace with the movements of the court, who finally left him a judgment debtor, after having twice declared that he had a good defense, but each time when the court had placed defendant in a position where lie could not avail himself of such defense. For the defendant’s disasters, thus resulting, there must be a remedy. We find it as follows: A party in an action is bound by his pleadings. He is also bound by the rulings of the court which lie obtains upon his own motion, and is estopped from claiming such ruling as error. (2 Herman on Estoppel, § 823, and noie.) A party is bound by his theory and presentation of his case. “A party cannot get relief on one basis, and then seek a new chance to litigate, on the suggestion that he has a defense, which he did not see fit to rely on before.” (Beam v. Macomber, 35 Mich. 457. See, also, Belanger v. Hersey, 90 Ill. 73; Sweezey v. Stetson, 67 Iowa, 481.) “Where a party gives a reason for his conduct and decision touching anything *263involved in a controversy, be cannot, after litigation lias begun, change bis ground, and put bis conduct upon another and a different consideration. He is not permitted thus to mend his hold. He is estopped from doing it by a settled principle of law.” (Ohio etc. Ry. Co. v. McCarthy, 96 U. S. 267. See, also, Dreyfous v. Adams, 48 Cal. 131; Long v. Fox, 100 Ill. 43; McQueen v. Gamble, 33 Mich. 344; Callaway v. Johnson, 51 Mo. 33; Edwards' Appeal, 105 Pa. St. 103.)
When the plaintiffs in the case at bar had procured the ruling of the court that the contract was void, they placed their theory of the case upon record. Might they then, “upon afterthoughts, new suggestions, and new aspects of the case, change their position of the ease from that on which they deliberately chose originally to present it to the court?” and especially after defendant had accepted the construction of the contract, demanded by plaintiffs, and held by the court. Plaintiffs were estopped by the position they had assumed, and into which they had forced defendant, when, to change that position, in the time and in the manner that it was changed, deprived defendant of all defense whatsoever. The decision of the court holding the contract valid was made after the testimony was closed and the case argued and submitted, and submitted on pleadings which forbade evidence in recoupment. If the court had made his reformed ruling before the close of the case, defendant could have obtained leave to amend himself back to his original position, and obtain a continuance on the ground of surprise, if necessary, to enable him to obtain and produce his evidence of damages. It would seem that the action of the court was accident and surprise, against which no ordinary prudence could have guarded. We are of opinion that plaintiffs were estopped from asserting that the contract was valid, or of receiving the benefit of the ruling of the court to that effect, when such ruling came at the time, in the manner, and under the circumstances that it did, and to the total deprivation to the defendant of his defense to the action. Therefore the latter ruling of the court, although correct by construing the contract, under the circumstances described, and entailing the results that it did, and taken with the former position assumed by the court, and depriving defendant of a substantial right, was error.
*264We make no reflection upon the distinguished judge who tried the cause. His reformation of his first opinion is a credit as well to his eminent and conceded ability as to his known sense of justice and probity. His action complained of was more in the nature of a misfortune, which happened to be fatal to the defendant.
Respondent urges that the statement on motion for a new trial cannot be considered, as it was not settled by the judge who tried the case, but by his successor in office. It is not necessary to consider this objection, as the data for our conclusion are all found in the judgment roll, and the appeal is from the judgment, as well as the order denying the motion. We cannot leave this case without animadverting upon the record as it is presented. This court has heretofore had occasion to remind counsel that the preparation of a record is their duty, and it is not for them to leave the Supreme Court to grope through a disorderly mass of immaterial matter to ascertain that which counsel relies upon. (Upton v. Larkin, 7 Mont. 462; Raymond v. Thexton, 7 Mont. 305; Fant v. Tandy, 7 Mont. 443; Sherman v. Higgins, 7 Mont. 479.) In the record in this case, the complaint, second amended complaint, replication, judgment, notice of motion, and specification of erroi’s all appear twice in full, instead of being once inserted, and afterwards noticed by appropriate reference. Where reference is made, pages are omitted. It is difficult to refer to page-. The matter is not presented in that orderly, systematic, chronological method that presents to the court an intelligent view of the case at a reading. When we do arrive at the gist of the matter, it is after such labor as caused the learned compilers of the Institutes of Justinian to say, in the dedication of that work, et opus desperatum, quasi per medium projundum mutes ccdesii favore ad implemmus. The judgment is reversed, and the cause remanded for a new trial.
Blake, C. J., and Harwood, J., concur.