|
-
Mar 11th, 2005, 08:33 AM
#1
Thread Starter
New Member
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
-
Mar 11th, 2005, 06:23 PM
#2
Frenzied Member
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.
.
-
Mar 11th, 2005, 07:49 PM
#3
Fanatic Member
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.
-
Mar 12th, 2005, 04:29 AM
#4
Frenzied Member
Re: An error with SGRID 2.0 Control
Rob, How many rows, columns per grid - typically?
-
Mar 12th, 2005, 06:47 PM
#5
Fanatic Member
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.
-
Mar 12th, 2005, 08:08 PM
#6
Frenzied Member
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 ?
-
Mar 13th, 2005, 01:55 AM
#7
Fanatic Member
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 ?
-
Mar 13th, 2005, 04:56 AM
#8
Frenzied Member
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:
' Place these in the declares section of a module
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private LastTickWas as Long
' Place this is the body of the module
Public Function TicRef() As String
Dim n As Long, m As Long, p As Long, k As Long, z As Long
n = GetTickCount
p = n - LastTickWas
z = n - RunningCount
LastTickWas = n
If p > 5000 Then
TicRef = " (-----:000)"
RunningCount = GetTickCount
Else
TicRef = " (" & Format(p, "000") & ":" & Format(z, "000") & ")"
End If
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:
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|