Please take a look at this forum thread
which contains a rather long discussion and code samples on the topic, I believe you might find it useful.
All the best,
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items