Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To WebGrid or not to WebGrid...what is the answer?

I'm reading and hearing some pain points and am wondering if I should even go that route. Not to mention, I cannot seem to find any definitive documentation (from Microsoft). If you say I shouldn't use it, what route would you suggest? I'm trying to get a new site off the ground, but I want to do it right the first time.

like image 736
jsteve81 Avatar asked Feb 09 '11 05:02

jsteve81


3 Answers

I would say you should choose to use WebGrid if you are looking to quickly and easily display data and not have to rely on any external libraries. However, if you're looking for a fully-featured grid, I would not go with WebGrid right now. There are difficulties in applying styles and doing more advanced aspects that are available in other popular web grid libraries.

As for my opinion on what you should use - if WebGrid does not meet your needs, check out jqGrid. It's a very popular package and works amazingly well and is fairly easy to setup and run.

If you would like more documentation on WebGrid, check out Microsoft's ASP.NET MVC 3 tutorial site.

like image 129
JasCav Avatar answered Nov 19 '22 23:11

JasCav


I looked at pure html tables, mvccontrob grid, jqgrid, and webgrid. With only limited experience with all three here is what I found:

jQgrid is the most powerful and supports jquery UI themeing. I was able to implement inline editing, sorting, filtering, and simple server-side validation. It took me three days to figure it out, but that is not too bad considering all the features I implemented. I was able to figure it out by searching the internet and finding examples, so there is a lot of resources out there for it. It does involve a lot of javascript, though. The thing I liked the least about it was the search feature. It has too many options turned on by default and I am having trouble turning off the ones I don't want to use.

Mvccontrib grid was very easy to get up and running but inline edting is not supported. Also, I read this post which to me sounds like it won't be supported much longer: mvccrontrib

Bummer, it was a very nice and easy to use grid.

I found webgrid to be easy to set up but it also has no inline editing. Its default paging I guess is really inefficient too, it always returns all rows regardless of the # records per page.

If you need inline editing, jqgrid is definitely the way to go.

If not, I would have said Mvccontrib if it wasn't being shelved. That leaves me with pure html tables or webgrid, and I like the pure html tables better, as Naveen recommended. I was able to implement sorting, paging, and filtering pretty easily.

I am going to stick with jqgrid now that i have a working example and look at Jquery UI Grid when it is in production.

like image 9
steveareeno Avatar answered Nov 20 '22 01:11

steveareeno


I cannot tell you whether you should use or not the WebGrid helper because that would be subjective and especially as you just talked about pain points in your question without any specific details. What I could do is offer you some good alternatives:

  • MVCContrib
  • Telerik Extensions for MVC
like image 8
Darin Dimitrov Avatar answered Nov 20 '22 00:11

Darin Dimitrov