All persons required to be made parties in child custody proceedings or proceedings for the termination of parental rights shall be made parties to any proceeding in which a grandparent of a minor child or children seeks to obtain visitation rights with such minor child or children; and the court may, in its discretion, if it finds that such visitation rights would be in the best interest of the child, grant to a grandparent reasonable visitation rights with the child. Whenever visitation rights are granted to a grandparent, the court may issue such orders as shall be necessary to enforce such rights and may modify or terminate such visitation rights for cause at any time.