In this paper, we study the problem of mutual interference cancellation among secondary users (SUs) and interference control to primary users (PUs) in spectrum sharing underlay cognitive radio networks (CRNs). Multiple antennas are used at the secondary base station (SBS) to form multiple beams towards to individual SUs, and a set of SUs are selected to adapt to the beams. For the interference control to PUs, we study power allocation among SUs to guarantee the interference to PUs below a tolerable level while maximizing SUs' QoS. Based on these conditions, the problem of joint power allocation and beamforming with SUs selection is studied. Specifically, we emphasize on the condition of imperfect channel sensing. And we formulate the problem as a discrete stochastic optimization problem, then an efficient algorithm based on a discrete stochastic optimization method is proposed to solve the joint power allocation and beamforming with SUs selection problem. The proposed algorithm has fast convergence rate. Finally, simulation results are presented to demonstrate the performance of the proposed scheme.