Edited by Martin Sutherland
Is VB6 MSFlexGrid editable? No.
The Microsoft FlexGrid control also known as MSFlexGrid shipped with Visual Basic 6 is good to display read-only tabular data. But what if you want to have editable VB6 MSFlexGrid, especially if you store Unicode strings in its cells? You lose if you choose MSFlexGrid, but the situation is changed dramatically if you use our iGrid ActiveX grid as a VB6 MSFlexGrid replacement:
Look at the picture carefully, especially at the options pane. You will notice many features missing in VB6 MSFlexGrid. For instance, you cannot edit cells in VB6 MSFlexGrid, but iGrid allows you to do it. You can even create a checkbox column not available in MSFlexGrid.
How to edit a cell in MSFlexGrid in VB6?
If you need to edit cells in your MSFlexGrid, you can use any open-source solution 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 MSFlexGrid cell to edit it. Thus, you will need to have one more text edit control for every MSFlexGrid in your app to edit MSFlexGrid cells. Moreover, you will also need to duplicate all this helper code related to the MSFlexGrid editing infrastructure for all MSFlexGrids instances in your app. iGrid provides you with the built-in cell text editor integrated into the whole grid infrastructure, and thus you have editable VB6 MSFlexGrid replacement with no coding.
Replace MSFlexGrid OCX to get rid of other drawbacks
Another serious problem of MSFlexGrid OCX you may already know about is its speed. MSFlexGrid 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 row sets containing 100'000+ rows.
Add to this the poor set of VB6 MSFlexGrid 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 VB6 MSFlexGrid:
- You can edit cells using cell editors like text edit, combobox (drop-down list) and checkbox control.
- iGrid cells can store values of any type (cell values are VB6 Variants).
- 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 any coding efforts from your side!
And the last, but not least thought for this brief comparative overview. VB6 MSFlexGrid was developed in '90s and is no longer supported nowadays. It has the old-fashioned unchangeable 3D look and cannot use the visual styles available in the Windows OS - like Windows 7 or Windows 10. By default iGrid always uses the system look in its constituent items (column headers, scroll bars, cell combo buttons), and this is one more reason why we recommend iGrid as a good and powerful editable VB6 MSFlexGrid replacement.