views:

71

answers:

3

Hi,

I need to choose a jQuery data grid plugin that plays well with MVC2.

I sit firmly on the client side so know nothing of MVC2 so was wondering if any had any particularly good or bad experiences in MVC2 with either of the following:

Datatables

Flexigrid

jqGrid

The following functions are required:

  • Free to use commercially
  • Column sorting
  • Custom column sorting types (sorting checkboxes checked/unchecked, price ranges)
  • Row/Column highlighting
  • Pagination
  • Filterable grid content via free text input (autocomplete possible) and check boxes
  • Multi-column sorting would be nice but not essential

From what i have seen jqGrid looks great but is a paid for solution and possibly overkill for the requirements.

Flexigrid seems to be a bit dead in terms of core development.

I really like Datatables but am struggling to see its compatibility with MVC2. Does anyone have any experience implementing this plugin with MVC2? Or any better recommendations?

Admittedly this is not really a question with a definite answer but any advice greatfully received.

+2  A: 

We used datatables w/ MVC2 in our group with great results.

orolo
Did you use any resources in particular to help?
RyanP13
It was a relatively painless process. The developer struggled with the jQuery side (he's a .NET guy) but basically we just googled "jQuery datables MVC" and there is a lot of tutorials etc. I helped a bit with the jQuery side but it worked slick. We didn't retain any particular resource, unfortunately.
orolo
+3  A: 

jqGrid has all features which you need excepting Multi-column sorting. Probably this feature will be implemented in one of the next releases of jqGrid.

If you compare jqGrid with Flexigrid you correct mention that jqGrid are living. See for example the last 3.8.1 release October 24th, 2010 and even more recent changes which you can see and download from github.

There are two versions of jqGrid: Free, Open Source package as pure JavaScript solution delivered with GPL & MIT licenses and commertial which is integrated for example in Visual Studio development environment. You can use any from the versions in your ASP.NET MVC Project.

jqGrid can be used to fill data from almost any web service providing data in JSON or XML format. So you can write in ASP.NET MVC a Controller method which provide pure data in the JSON format and use View with empty <table>. If you want you can implement the "data provider" as ASMX or WCF service. You can also combine any from the solutions in one site, so you will be free in the implementation.

Look at the other question where you can find some links with examples of the usage of jqGrid with ASP.NET MVC.

Oleg
I did really like it but it does a lot that i don't need to be honest. Especially as what i am building is a web app with tons of JS already so there wold be a lot of unnecessary weight and calls to the server.
RyanP13
@RyanP13: I am not sure that I understand your comment correctly. If you use already JS the usage of free JS only version of jqGrid will be mostly easy for you for implementing. jqGrid support local data sorting, paging and filtering. If you already has all data **on the client side** you don't need to implement any server compoments. You can just call jqGrid and fill there with all data, but it can show the user only a part of data and permit to page, sort or filter or modify the data (all on the client side).
Oleg
we will be conducting all sorting on the server side. we were originally using tablesorter but that is client side only, hence why I am asking about compatibility with mvc.
RyanP13
+1  A: 

Have you looked at Telerik Grid for MVC?

http://www.telerik.com/products/aspnet-mvc/grid.aspx

uberDesi