Results 1 to 8 of 8

Thread: An error with SGRID 2.0 Control

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    2

    An error with SGRID 2.0 Control

    Hi all

    I am using the SGRID 2.0 Control from vbaccelerator and works great, but sometimes I have an error that closes my app telling me that: "a not allowed operation ..."

    well, this only happens sometimes when i load a form that contains a SGrid control, but for example, I could open the same form forty times and don't give an error so i have no idea where can be the error

    My question is if you people have seen the same error? or have another problem with that control?


    Thanks

  2. #2
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: An error with SGRID 2.0 Control

    The only time I have had problems with the control is when I don't set redraw = false prior to a clear. But that is an error in my programming. You will also find that if you try and create the grid with all columns hidden you will getm fault.

    Apart from that I find it an incredibly stable and usefull grid.

    .
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  3. #3
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: An error with SGRID 2.0 Control

    Never had an error like that.
    And I have an approach that is quite demanding on the grid.
    Rather than have code to handle changes to to the grid's contents, I just bounce the form, and reload it all from scratch.
    EG Say the user clicks a cell and I show a sub form that allows editing on the related record. They may do changes to that record such that it requires changes to what the grid is showing (perhaps even requiring that record to be no longer shown in the grid). Rather than add complex code to handle that, I just close the form(containing the grid), and re-show it again. This can challenge many grids, but the SGrid handles it perfectly.
    Rob C

  4. #4
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: An error with SGRID 2.0 Control

    Rob, How many rows, columns per grid - typically?
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  5. #5
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: An error with SGRID 2.0 Control

    David, There are 30 Cols so far, but not too many Rows, as it is still being tested by user. Probably would have 1000 to 2000 rows once it has been live for a while.
    However it has a concept of 'Favorites' (remembered configurations = show/hide cols, sorts, filters etc), so it is doing a lot of manipulating with each bounce. Which it does effortlessly.
    Rob C

  6. #6
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: An error with SGRID 2.0 Control

    What is your grid build time. With 30 rows I would anticipate about a second. Is this what you are finding ?
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  7. #7
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: An error with SGRID 2.0 Control

    If I say 'one', just when I press the button to call the grid, I don't quite finish saying 'and' before the grid shows. (I don't get to 'two')
    So I reckon .6 of a second.
    I then tried a full bounce, which means it has to close the detail form, return to the grid, then bounce the grid (in case data requires different display), and it is still under 1 second.
    Not to shabby for the price we paid ?
    Rob C

  8. #8
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: An error with SGRID 2.0 Control

    The point is well taken Rob - no it's not shabby at all.

    FYI, my column count is anything between 10 and 200 (scrolling X axis of course), and at between 20 and 30 msecs (depends on PC Speed) it can take as long as 6 seconds JUST to establish the columns.

    I was wondering if anyone else had seen this or if it was just an issue with my configuration.

    BTW if you ever want to time a process use the following

    VB Code:
    1. ' Place these in the declares section of a module
    2. Private Declare Function GetTickCount Lib "kernel32" () As Long
    3. Private LastTickWas as Long
    4.  
    5. ' Place this is the body of the module
    6. Public Function TicRef() As String
    7.      Dim n As Long, m As Long, p As Long, k As Long, z As Long
    8.      n = GetTickCount
    9.      p = n - LastTickWas
    10.      z = n - RunningCount
    11.      LastTickWas = n
    12.      If p > 5000 Then
    13.           TicRef = " (-----:000)"
    14.           RunningCount = GetTickCount
    15.           Else
    16.           TicRef = " (" & Format(p, "000") & ":" & Format(z, "000") & ")"
    17.           End If
    18. End Function

    I call Tickref in a Debug.Print line whenever I go into key routines that way I can track my program in the immediate window and see where things are running slow.

    In my key procedures I use it like this...

    VB Code:
    1. Debug.Print TicRef & " A99_ResultsHandling --> G2_BuildArray"
    When I run my code, a typical immediate window looks something like this..

    (500:8297) A99_ResultsHandling --> LoadGrid1ColumnIndexes
    (000:8297) b_Calls_Misc --> BuildUPNIndexFromGroupedGlist
    (047:8344) A61_Grid1 --> Display_Grid
    (015:8359) A61_Grid1 --> Display_Grid --> 2.5
    (829:9188) A61_Grid1 --> Display_Grid --> 3
    (015:9203) A61_Grid1 --> Refresh_Grid
    (235:9438) A61_Grid3 --> Load_Grid
    (000:9438) A61_Grid3 --> Display_Grid
    (015:9453) A61_Grid1 --> Refresh_Grid
    (063:9516) A61_Grid2 --> Load_Grid
    (000:9516) A99_ResultsHandling --> G2_BuildArray
    (015:9531) Module --> b_Calls_Misc --> GroupedGListToSQL
    (000:9531) Module --> b_Calls_Misc --> GetLatestResults
    (016:9547) b_Calls_Misc --> TopTailandSplit
    (094:9641) A61_Grid2 --> Display_Grid
    (015:9656) A61_Grid2 --> Refresh_Grid

    The left hand number is the duration since the previous line was called. So "A61_Grid1 --> Refresh_Grid" takes 235 Milliseconds in this snapshot example. The right hand number is the ongoing time since a user last kicked off an event.

    With the code above, if TicRef is not called on within 5 seconds the running count zero's.

    I thought you may like this as it saves you having to keep counting under your breath
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width