Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Compare JqGrid with XtraGrid

2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

This can only compare the advantages and disadvantages of the two functions, and realize the convenience and efficiency of a certain function and effect. First of all, a rough introduction to XtraGrid and jqGrid respectively

DevExpress is the most powerful and complete UI control library under. Net at present, and XtraGrid is one of the important controls in this control library. A large number of advanced features are integrated in XtraGrid, so developers who use it only need to simply set its properties or write a small amount of code to create a very beautiful interface, thus greatly improving the efficiency of development.

The characteristics are as follows

Fully support ADO.NET, fleeting data loading speed, XtraGrid makes full use of the built-in ADO.NET function. Using these new data access architectures and the separation of internal data modules from data representation, XtraGrid does not use any additional buffering in any data load mode, even though XtraGrid uses very little memory and performs request operations as quickly as fetching data from a data source when columns are grouped.

Advanced unbound mode support, XtraGrid can work with all supporting List or ITypedList and their inherited interfaces.

Ribbon / beautiful columns, when the screen looks precious, you can use the ribbon column to maximize the number of visible columns to the customer. You can even easily and simply display an image in the column header.

Automatic data grouping and support for connection point grouping, allowing your users to group data stored in XtraGrid with unlimited columns, enabling them to analyze and edit information that they have never had before.

Automatic column grouping. With XtraGrid, you can sort an unlimited number of columns without writing a single line of code.

Automatic data filtering, with Excel-style filtering features, you can filter data based on column content-any column. Filter expressions can even be displayed at the bottom of the grid to remind your users what they are looking for. You can also create your custom filter dialog box to match the filter features that users need.

True master detail support (Master-Detail), XtraGrid allows you to establish and represent master detail (master-detail) information in bound or unbound mode, and you can even use drop-down mode to scale each detail level, allowing simple maintenance of the most complex relationship settings.

CustomDraw custom drawing, need to draw any Grid objects-rows, column headers, etc.? There is no problem with using XtraGrid, only your imagination is limited.

Advanced design-time support, and XtraGrid provides an advanced design-time editor that allows you to control the appearance of all XtraGrid without writing a single line of code. Using advanced design enables you to manage advanced features such as levels, styles, columns, and summaries.

Complete data summarization, generalization allows you to express statistics such as MIN, MAX, AVG, SUM and COUNT directly in Grid without having to use the old and ugly separate edit controls. You even allow your users to summarize chunked data with grouping headers and footers.

Based on the View architecture, each level in XtraGrid can be expressed by a different View. XtraGrid uses standard rows and rows View as well as CardView, similar to Microsoft Outlook. All Views can be changed quickly.

Multiple editors per column-the same column of XtraGrid can use different editors.

JqGrid is a jQuery plugin that provides a grid interface and supports Ajax to connect to data sources on the server. JqGrid provides several modes of operation on a common infrastructure, which are packaged in different files. In addition to several shared files, the user selects the operation mode as needed and uses the corresponding program file. Unfortunately, the common functions of each operation mode are similar, but the reusability of the program has not been further integrated and improved, and the update speed of each mode is not consistent.

The characteristics are as follows

Complete table presentation and operation functions, including page change, field sorting, grouping, add, modify and delete data and other functions.

Customized tool list.

The default Navigator toolbar makes it easy to use the add, delete, edit, view and search functions.

Complete paging function.

Press the header of any column below to make it a sorted item. Whether it is to increase the power or decrease the power.

The default action formatter allows you to do operations on each piece of data quickly and intuitively.

In addition to the formatter provided by jqGrid lib (including email,link,select,checkbox,date, etc.), developers can customize the presentation of data from data sources, that is, the so-called custom formatter.

The difference between the two can be attributed to the following aspects:

Table view

There are four types of View in XtraGrid: GridView (2D table view), BandedGridView (banded 2D table view), AdvBandedGridView (advanced banded 2D table view with some additional operation functions) and CardView (card view). All four types of View inherit from ColumnView, while ColumnView inherits from BaseView. BaseView and ColumnView are both abstract classes (abstract) and cannot be instantiated.

Because each view is a class, they rewrite the base class ColumnView differently, so some effects can be achieved in one view, but not in another.

JqGrid also has two-dimensional table views, strip two-dimensional table views, and tree views.

For the two-dimensional table view and the ribbon table view, the only difference between them is that one more header group is added at the attribute, and the operation of the table is exactly the same, so the function and effect of changing the type of view will not be different.

Template column

XtraGrid provides a wealth of template column types, but there is a lack of custom templates, a template column can only use one type, such as a column in which you want to put a non-editable text box, an image button, and a calendar control, so it is impossible. And that template column can only use the set of template column types defined by XtraGrid, not even if you want to use your own defined type or Microsoft's original defined control. The advantage of using its original control is that the get/ set value is more convenient, but also makes it impossible for the template to use other controls.

JqGrid itself does not provide template column types, just like .NET 's own GridView, you can add multiple controls to the template. I feel that the template column of jqGrid is very free and open, and you can place one or more controls in the template, either written by yourself or other plug-ins.

Pagination

XtraGrid provides a paging bar, just set the UseEmbeddedNavigator property of gridControl to true. There are two ways for XtraGrid to achieve paging, one is to use the Server Mode mode of XtraGrid itself. However, this method has many disadvantages: 1) data cannot be edited, added, or deleted; 2) data cannot be arranged and filtered by displaying values (but editing values can be used for these operations); 3) ColumnView.CustomColumnSort events are not triggered when users are sorted; 4) GridView.CustomColumnGroup events are not triggered when users are grouped; and 5) GridView.CustomSummaryCalculate events are not triggered when users calculate summaries. 6) in Server Mode mode, the primary key of a data table cannot be combined by multiple columns. Another way is to make use of SQL's paging query.

JqGrid also provides a paging bar, which is similar to the second way of XtraGrid, using SQL's paging query.

Personally, I think it is better to use SQL paging query to achieve paging, even if the Server Mode mode of XtraGrid does not have so many disadvantages, using Server Mode mode, in case the control is changed one day in the future, or even changed from C-SQL S mode to Bhand S mode, the amount of code to be changed will be larger than that of SQL paging query.

Data source

The data source binding of XtraGrid is different from that of traditional GridView. After the binding operation, the data on the XtraGrid is still synchronized with the data of the data source, that is, if the data in the XtraGrid is modified, the data in the data source will also be modified, and if the data in the data source is modified, the data in XtraGrid will also be modified. And it can easily get the object of a row of records, such as binding a List to XtraGrid, and XtraGrid can get the People object of a row through the GetRow method. Another advantage is that if you want to modify some data in batches, you can manipulate the data source directly, so you don't need to traverse the cells to modify it.

After jqGrid binds the data source, the data in the table and the data in the data are the same as in the case of GridView, the two are not related, and the data of one side is modified without any impact on the other.

Summary

Combining the advantages of jqGrid and XtraGrid, I think that a good grid control (or plug-in) should have the following functions in addition to its gorgeous appearance:

Have the function of statistical operation

Have the function of parent-child table

Sort, group, filter a column

Provide toolbars to facilitate add, delete, change and search operations

Has a variety of paging data reading functions (such as traditional reading data through the paging bar and controlling paging data through the scroll bar)

Support multiple types of data collections as data sources

The information of the cell can be easily obtained.

Changes to table data can be synchronized to the originally bound data source collection

Provide a simple method to verify the format of the data.

Facilitate data import and export

You can easily set up striped columns

Provide multiple editors

Templates allow free combination of multiple editors, and you can add arbitrary controls (plug-ins into the template)

Keyboard shortcuts are supported to reduce the number of users switching between mouse and keyboard

Rearrange the columns according to the needs of the user

The above is purely personal opinion, there are any deficiencies or mistakes, welcome to correct.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report