Hi Ravi,
as mentioned earlier the document posted by sreehari (link) is working fine.
Unable to understand why you not able to achieve it.
Can you please post your code, so that it will be helpful to solve your query.
See the sample output below
Regards,
Madhumahesh.