You can set up a "bare" or "simple" trust for your grandsons. This way you hold the shares as nominee, but your grandsons are liable to income and capital gains tax on the shares. If the amounts are relatively small you can simply add the children's names to your own on the holding - eg Joe Bloggs trustee for Jack and Jim Bloggs. If you set up a bank acount to accept the dividends, you can do the same thing. You might also like to draft a formal letter stating what you have done.
Your grandsons cannot reclaim the tax credit on dividend income, but if there is any interest arising on a bank account, you can claim to have it paid net of tax (provided the annual amount is less than �5035)
Each grandson will have an annual CGT exemption, currently �8800.
If there is a lot of money involved I would recommend you get legal advice, as you may want a more formal trust which allows you discretion in the allocation of trust funds.
Just to add that these trusts do not work in the same way of a parent gives money to their own child.