- 1 year ago
Storing extra value for cells on iGrid 4
In iGrid 4, a lightweight ActiveX grid control for Visual Basic 6.0 and .NET, the built-in cell object does not have a direct provision to store extra values or custom data. However, you can utilize the Tag
property of the cell to store additional information for each cell. Here's how you can do it:
- Assign a value to the
Tag
property of a cell:
vbiGrid1.Cells(row, col).Tag = "Extra Value"
- Retrieve the stored value from the
Tag
property:
vbDim extraValue As String = iGrid1.Cells(row, col).Tag.ToString()
By using the Tag
property, you can store any additional data or values associated with each cell. You can store strings, numbers, or even custom objects in the Tag
property. However, it's important to note that you need to handle type conversion when retrieving the value from the Tag
property based on your specific data requirements.
Remember to consider the limitations of the Tag
property. It is a generic object type and doesn't provide built-in data validation or type checking. Ensure proper data handling and type conversions when using the Tag
property to avoid potential runtime errors.
Additionally, iGrid 4 is a legacy control, and newer versions of iGrid may offer more advanced features or options for storing additional cell data. You may want to consider upgrading to the latest version of iGrid if you require more extensive functionality for storing and manipulating cell data.