Telerik MVC Grid Grouping with nHibernate


I have an MVC3 with nHibernate project, and I would like to make use of the Telerik MVC Extensions Grid. The grid must perform well by passing the filtering, paging, and sorting parameters to nHibernate. This can be done described here with IQueryable. However, according to Telerik, nHibernate linq provider doesn't understand the group by query the mvc grid generates.

Their example is more than a year old, so I've just updated the sample project they provide to MVC3, nHibernate 3.2, and Telerik Extensions 2011.3.1115 and the sample project throws an error when I drag a column into the "Group By" space. I'm guessing the problem is still there.

Is there a way to get this to work, or nothing can be done until nHibernate supports the group by syntax that the Telerik Grid is generating?

There is no way to do it automatically like with an IQueryable, however, you can do it manually by using custom binding. Take a look at the demo here. Basically your controller action will get a command class as an argument that will list your Filter, Group, Sort, and Paging info. You will then need to use this information to build up your query.