views:

77

answers:

4

I am new to ASP.NET MVC and I want to know your opinion about what is the best way to display some data from database using a <table>... an ASP.NET control or a jqGrid?

In which situation must each of them be used?

I appreciate any tips. Thanks.

+1  A: 

If I understand correctly, the MVC model doesn't support the server-side event handling of standard asp.net controls, so I'd say that the jquery grid is definitely the best option.

JustABitOfCode
You are right. There are no events send from clients to sever in asp.net mvc.
Jenea
+1  A: 

Asp.net controls cannot be used in asp.net mvc.

The best way is to create a ViewModel classes and declare View as strongly typed. I could continue but unfortunately don't know what exactly do you need.

Jenea
A: 

Do you mean ASP.NET Controls or ASP.NET MVC Controls?

ASP.NET Server Controls should not be used in this framework... or rather, you should not use anything that relies on postbacks and/or viewstate. There are tricks to get some to work, but YMMV.

If the control is an ASP.NET MVC Control, that's a different story, and it will work ok. JQuery controls also work since they are javascript controls.

sorry for the abstract questionlet's say i want to extract info about cars from database (a picture and some other info), it was just an example, the most elegant/fast way is to use a html table, asp.net server controls or jquery controls? asp.net-mvc controls are out of way because i saw that they are light weight controls, i also saw that there can be created custom asp.net-mvc controls.So..when working with data in general, what is preferable, i read that jquery grid is the fastest so the best what do you think?
If you want to use ASP.NET server controls, use classic ASP.NET, not the MVC Framework.Fastest is all relative. It depends on how you use it and how much data you pull. The data still needs to be rendered in the browser, but of course, rendering it in the back end may be a bit faster than rendering the data using javascript in a jquery control.On the other hand, if you are dealing with a server with heavy usage, you may want to offload that work to the client.
A: 

use the MvcContrib grid. it is working fine

Gregoire