GraffitiWebGrid Read cell contents in a loop

  1. last week

    I use GraffitiWebGrid and read the contents ofa text file in order to fill rows in a column using this:

    textInput = TextInputStream.Open(f)
    textInput.Encoding = Encodings.UTF8

    so far so good...
    But when try to read the contents of each cell using...

    Dim longstringhistorytext as Variant 
    Dim cellVal as string
    For x as integer = 0 to 10
      dim currColumn as GraffitiWebGridColumn = GraffitiWebGridBPSH.Column(1) 
      dim Row as GraffitiWebGridRow = GraffitiWebGridBPSH.Row( x )
      cellVal=Row.Cell( currColumn )
      longstringhistorytext = longstringhistorytext + cellVal 
    next x

    I get allways an empty cellval
    Any help in that...?

  2. Anthony C

    Sep 11 Pre-Release Testers, Xojo Pro, Third Party Store GraffitiSuite Developer

    You should create a ticket if your subscription is up-to-date. There are far too many variables. Assuming you're using an old version, you'd need to update to the latest if it is a bug.

  3. Edited last week

    No subscription, using 27.2 version... Don't think it is a bug but not sure if the syntax is ok...
    Cant' afford to update the license...

  4. Anthony C

    Sep 11 Pre-Release Testers, Xojo Pro, Third Party Store GraffitiSuite Developer

    All I can really say for sure is that this functionality works in the current demo.

  5. It is strange because on the same project this code works.
    The only difference is that the Webgrid is on a WebDialog and I'm using different styles and the contents of the grid is not loaded but set by the user.

  6. Anthony C

    Sep 11 Pre-Release Testers, Xojo Pro, Third Party Store GraffitiSuite Developer
    Edited last week

    Anytime content isn't shown in the grid, you need to check your column IDs. Review the Common Problems section of the GraffitiSuite documentation for more information.

    If the content is shown but you're failing to get data from the appropriate methods, I can't really say. It's not something I recall seeing, and I'd need a ticket with an example project built from the latest version.

or Sign Up to reply!