Edited by Martin Sutherland
Is FlexGrid editable? No.
The Microsoft FlexGrid control (MSFlexGrid OCX) shipped with Visual Basic is good enough to represent read-only tabular data. But what if you want to have editable FlexGrid, especially if you store Unicode strings in its cells? You lose if you choose FlexGrid, but the situation is cardinally changed if you use our iGrid ActiveX grid as a FlexGrid replacement:
If you need just cell editing in your FlexGrid, you can use any free recipe from the Internet (for example, this - Editable FlexGrid/Grid Control in VB4/5/6). But such a solution is based on the idea that you place a textbox control over the current FlexGrid cell to edit it, so you will need to have one more text edit control for every editable MS FlexGrid in your app and you will also need to copy all helper code to maintain the editing process for all these FlexGrids too. iGrid provides you with the built-in cell text editor which is integrated into the whole grid infrastructure, and thus you have editable FlexGrid replacement with no coding.
Replace FlexGrid to get rid of other drawbacks
Another important problem of MS FlexGrid OCX you may already know about is its speed. FlexGrid is slow when you populate it with data, especially if you need to have a grid with thousands of rows. iGrid is free of this problem, it was optimized to work with huge record sets.
Add to all this the poor set of FlexGrid control events you cannot use to control all the aspects of the grid functionality.
Let's note the main advantages you get when you use iGrid instead of MSFlexGrid:
- You can edit the cells using such cell editors as text edit, combobox (drop-down list) and check box control.
- The cells can store values of any type (they have the Variant type).
- If a cell or column header is truncated, a built-in tooltip displays the full text.
- iGrid fully supports Unicode while displaying and editing data.
- The selection can be semi-transparent; row selection mode to select whole rows is also available.
- The user can sort and group columns using the standard grid interface without your efforts to code this!
And the last, but not least thought for this article. MSFlexGrid OCX was developed in '90s and isn't supported anymore. It has the old-fashioned unchangeable 3D look and it cannot use the visual styles available in Windows XP and newer systems - like Windows Vista or Windows 7. Our ActiveX grid always uses the system look in its constituent items (column headers, scroll bars, cell combo buttons, etc), and this one more reason why we can recommend iGrid as a good and powerful editable FlexGrid replacement.