In this example master contains list of libraries and details contains books from selected library. Of course you have to add clearing details grid if new library is added. Is this helpful for you or you needed to know something more complicated?
Thanks a lot Daniel,
I needed just this example to feel confident that the work can be done.