Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
201 views
in Technique[技术] by (71.8m points)

c# - JQuery GridView control

Does anything like this exist?

What I am looking for is a control that is going to be client-side, with the Edit, Cancel row capabilities of a GridView.

I wish to use it to collect the data from the user and then save on the server after the user is done entering data.

EDITED:

Thanks for all the recommendations. One thing that I would like to ask all of you before I delve and spend time on learning these frameworks.

All of you seem to use ASP.net MVC and mention that these toolkits are good with this. I am however, using ASP.net web forms. Do these frameworks play well with old flavour of ASP.net?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Client-side frameworks

In addition to jqGrid, there are several other javascript framework Grids that I've been playing with recently:

  1. Flexigrid: jQuery-based, no editing features yet, but planned.

  2. Ext's GridPanel: Ext js is another javascript framework which interfaces with jQuery.

  3. YUI's DataTable: The Yahoo User Interface (YUI) is yet another framework with an editable Grid control.

These are all client-side components: they operate in the user's browser, disconnected from your server code. Like Tracker1 and several others wrote, you'll have to either write Ajax methods yourself to wire the client-side grid to the server or you can try to take advantage of existing wrappers, such as:

Server-side options

  1. Coolite's Ext wrappers for .NET

  2. One of the in-progress YUI .NET wrapper libraries (YuiDotNet or Yui.NET). I don't think either of these implements a wrapper for the DataTable yet, but they may show you the way to do so.

Connecting the client and the server

If you haven't worked with a lot of Ajax or done much with these javascript frameworks, be prepared for a bit of a learning curve: as you begin to use them, you'll need to constantly bear in mind what's happening on the server and what's happening on the client (and when!).

If you use one of the straight javascript libraries I listed above, as opposed to a .NET wrapper, you'd have to write a server-side method to handle data submission and expose it to the client using your choice of technology (MVC's JsonResult controller actions, establishing WebMethods / ScriptMethods, etc.).

Related Stack Overflow Questions

Using ExtJS in ASP.NET and Returning data from ASP.net to an ExtJS Grid - these are focused on Ext's controls, but the answers contain a lot of good general information about connecting the new generation of javascript framework controls to server applications.

Good Asp.Net excel-like Grid control - you may also be interested in the answers to this question, particularly since it sounds like you want solid editing capabilities.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...