My apologies. Thinking about this problem, I realised that what I really need is the possibility to group the data manually before returning it, because the user won't be able to do that due to business rules. My grid is using ajax binding.
Thanks a lot.