Hi Ellakkiya Selvadurai,
Have you placed both the JavaScriptFunctions & AdvancedJavaScriptFunctions web block before your data grid as mentioned in the below screenshot for your reference?
If you add those web blocks on your page, I hope your problem will be resolved.

Regards,
Manish Jawla