Thank you very much Sai, it is working.. but I have another related problem.
I need to trigger this event once the table is loaded, not by button click..
I tried to use the code in init() .. etc but there I cannot get the table loaded..
Do you know where to add the code to make it run automatically?