An advance is a pre-payment of royalties to be earned upon the publication of your textbook. It will be recouped out of the royalties first accrued from the commercial exploitation of your work. It is not incoming for publishers to agree to advance from 50% to 100% of expected royalties on projected first year sales. The advance may or may not be refundable if your manuscript is rejected and your contract is cancelled.
A grant, conversely, is a payment intended to cover some or al of the out-of-pocket costs of research and/or manuscript preparation. It is generally not recouped out of accrued royalties, and like the advance, may or may not be refundable in the event the manuscript is rejected.