Dynamic configuration for LoadData on data grid

I have a generic data grid that can configure dynamically. for one instance it is configured for server-side paging and in another instance it is configured for client-side paging.

My problem is with LoadData event binding. How I can skip LoadData event binding from client-side paging, So library is responsible for Filtering, Sorting, etc. This can achieve using RenderTreeBuilder but is there a way using Razor syntax?

What prevents you to do this?