Thank you Hristo for your quick reply. This code was really useful. Though I have to make some changes, since code was not working correctly for sort of column.
Regards, Nilesh Thete