Advanced DataGridView Alternative - iGrid.NET

Edited by

If you use DataGridView from Microsoft's WinForms package, you may find that it was a bad choice at some stage of the development. The question of a good DataGridView alternative arise then. This problem is so popular, and it seems every good forum for developers contains a topic dedicated to this question (you can even find several topics like WinForms DataGridView Alternative on or similar valuable resources).

The brief comparison of the 10Tec WinForms grid control and DataGridView below will help you if you are also searching for a DataGridView alternative.

Alternative DataGridView features

iGrid.NET implements many features to simplify tabular data management and make the work of a WinForms developer much easier if we look at this process through the prism of DataGridView. These are the ability to sort the grid by several columns simultaneously just by clicking their column headers, incremental search functionality when you can find the required cell by typing some characters from this cell's text, auto-complete lists helping to enter long strings faster, and so on:

iGrid.NET as a DataGirdView alternative

You as a developer can adjust the constituent parts of the grid to suite particular needs. For instance, the scroll bars can be semi-transparent to increase the amount of visible information and can contain additional custom buttons to perform useful tasks directly in the grid interface.

Unbound mode

DataGridView was tailored as a data-bound grid control first of all. This is the main problem when you need to use DataGridView in unbound mode to build a custom interface (read the Unbound DataGridView: Typical Problems article to find out more). iGrid.NET is much more appropriate for this task as one of its main ideas is to provide you with a lightweight, easy-to-use and fast grid control for creating unbound grids. Something similar to ListView but more feature-rich and editable.

Many grid developers on the market are trying to create powerful data-bound grid controls. They implement as many features as they can or see in other products on the market. But this extra functionality is not needed in many cases. And as a result, the grid controls become very complicated and bloated due to all these additional features. We go another way. We include only most needed features in our grid and thus provide you with one of the simplest and fastest grid controls.

Despite its simplicity, iGrid.NET implements a rich set of methods and events for fine tuning its behavior. This allows you to implement data-bound interfaces you need as well. In DataGridView you stick to the standard predefined behavior and cannot change it a lot, and this is one more reason why you might replace DataGridView with our grid control.

DataGridView is slow

DataGridView is slow, and this is confirmed by numerous discussions in the Internet. Type various search queries like "DataGridView slow" or "speed up datagridview" in the search box of your favorite search engine, and you will find dozens of them.

When we were designing 10Tec grid, we kept in mind the problem of performance. We specially optimized the drawing/sorting/memory management code to get the highest possible performance.

We discuss the problem of bad DataGridView performance and compare it with iGrid.NET in another article on this website, Why is DataGridView Slow in Rendering, Filtering, Populating?.

Easy individual cell formatting

Our control can be used to store values of different types in the same column (or you can also have cells of different types, i.e. combo cells or check box cells in the same column). We do not say that it is not possible in DataGridView, but it is much harder to do that than in iGrid. In iGrid you simply access the cell matrix through the Cells object collection and set the required properties like in the following code:

iGrid1.Cells[2, 5].Value = 123;
iGrid1.Cells[3, 5].Value = "text";
iGrid1.Cells[3, 0].Type = iGCellType.Combo;

Can it be so simple in the Microsoft grid? The answer is "no" and we have one more alternative to DataGridView.

Multi-column sort in DataGridView

The default behavior of DataGridView is to sort the grid when the user clicks a column header, but this can be done only for one column at a time. Real users need to sort grids by several columns, and you can find some workarounds for this DataGridView multi-column sort problem in the Internet (see, for instance, the DataGridView Multi-column Sort article on CodeProject).

iGrid.NET has the built-in support for multi-column sorting:

Multi-column sorting in a DataGridView-like grid

To sort the grid by several columns, just click the column headers of the required columns holding down a modifier key like CTRL. And as you can notice from the picture, iGrid indicates what columns are included into multi-column sorting by displaying numbers next to sort arrows to give useful information about what columns were sorted first.

DataGridView grouping and DataGridView tree

Sooner or later you'll need to group rows in DataGridView, but it does not support interactive or programming grouping of rows. In iGrid you can group rows automatically using the group box or from code, or you can even insert group rows at any position if it is required by the unique logic of you app.

The row grouping feature is based on the ability to work with hierarchical data. Every row has its own level of nesting, and these values define the row hierarchy. This approach is used to group rows another way, when one of the columns becomes a tree (or so called TreeView). This feature also allows us to use iGrid as a DataGridView replacement when we need to implement TreeView in DataGridView (or simply DataGridView tree).

Full support of printing and print-preview

You cannot print DataGridView using a standard control or class of the .NET Framework. iGrid.NET has a special add-on component called PrintManager you can use for that. Yes, you may say that there are some ready-to-use code snippets in the Internet you can use to print DataGridView, but as we know, none of them supports all the features you can use in DataGridView. Our PrintManager fully supports all the features you can use in iGrid.NET, and moreover, you can print the contents of the grid using numerous options.

These grid printing capabilities demonstrate one more time that 10Tec DataGrid can be considered as an advanced DataGridView alternative.

Find out more about enhanced DataGridView features in iGrid.NET »