Thanks for the reply, Boyan.
The hard part is all done. The issue is only with the export. I have added the button and the data bind is all done. But the issue is when i click the button,i get all the column values, but i have a group column which may have # of columns vary based on user input is not getting downloaded properly. i mean the column headers, instead of having the actual values, have the variable name. please refer to attached.