(735 ILCS 5/2-1009) (from Ch. 110, par. 2-1009)
    Sec. 2-1009. Voluntary dismissal.
    (a) The plaintiff may, at any time before trial or hearing begins, upon notice to each party who has appeared or each such party's attorney, and upon payment of costs, dismiss his or her action or any part thereof as to any defendant, without prejudice, by order filed in the cause.
    (b) The court may hear and decide a motion that has been filed prior to a motion filed under subsection (a) of this Section when that prior filed motion, if favorably ruled on by the court, could result in a final disposition of the cause.
    (c) After trial or hearing begins, the plaintiff may dismiss, only on terms fixed by the court (1) upon filing a stipulation to that effect signed by the defendant, or (2) on motion specifying the ground for dismissal, which shall be supported by affidavit or other proof.
    (d) A dismissal under subsection (a) of this Section does not dismiss a pending counterclaim or third party complaint.
    (e) Counterclaimants and third-party plaintiffs may dismiss upon the same terms and conditions as plaintiffs.
(Source: P.A. 88-157.)