If I understand correctly, by 'menu is selected' you mean when a tab from RadRibbonBar is selected as the other elements in RadRibbonBar do not support selected. If so, the event is CommandTabSelected:
You can read more information about creating elements in RadRibbonBar in this article
and the other articles in the same section. Using the information that you will find there, you can loop over your data object (i.e. DataTable) and create the respective elements. You will also need to store some kind of parent id, which determines where an element should be placed.
As to the images, you can have two different ImageLists - one for 16x16 and one for 32x32. A column in your database will tell from which ImageList the image will be pulled out and another column will contain the index by which you should get the image from the specified ImageList.
I hope this helps.
All the best,
the Telerik team