I think the first one should work, but lets see if that solves the problem.
The second function parameter is the URL which the data is retrieved. In this case the "ajax" controller. To see what the other arguments represent open the "system/application/helpers/flexigrid_helper" file and read the function comments.