mikem
  • mikem
  • Newbie Topic Starter
2021-03-06T23:15:30Z
This is the code I am using,

dim x as integer
with igrid
.cols.count = 20
For x = 13 To 19
.Cols(x).Visible = iGBool.False '''<-- Error on this line
Next
End With

It drops an error stating that cols is read only.

Any clues? I cant see it in the manual apart from a reference that .invisible is a property of cols

Igor/10Tec
2021-03-08T09:41:24Z
If you do not have the Imports directive for the iGrid types in your code, you will get a compilation error. However, this should be
Quote:

error BC30451: 'iGBool' is not declared. It may be inaccessible due to its protection level.


To solve this problem, add the following directive at the top of the form module:

Imports TenTec.Windows.iGridLib

If you do not do this, you can still solve your problem by prefacing the types from iGrid like this:

.Cols(x).Visible = TenTec.Windows.iGridLib.iGBool.False

But in this case you will need to write 'TenTec.Windows.iGridLib.' before every iGrid type you use in your code.

BTW, the light bulb helper in VS suggests the first way to solve your problem too:

VS Light Bulb Imports Directive.png

Click to View Image5 View(s)



Let us know whether this helped to solve your problem.
mikem
  • mikem
  • Newbie Topic Starter
2021-03-08T15:50:28Z
Hi Igor,

Thanks for the info. Its working fine now.

Mike