Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Steve Lapides  
#1 Posted : Tuesday, November 12, 2019 5:09:35 PM(UTC)
Steve Lapides

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 18
Location: Vienna, Virginia

I'm trying to understand grouping with a test project. I'm using this code to group the attached table by the Inventor column:

With iGrid3.GroupObject
.Clear
.AddItem 2
End With
iGrid3.Group

I get a runtime error "Subscript out of Range" on the last statement.ScreenShot.png
Igor/10Tec  
#2 Posted : Wednesday, November 13, 2019 6:45:48 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,101

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
Please, send us a sample to reproduce this issue.
Steve Lapides  
#3 Posted : Wednesday, November 13, 2019 7:03:16 PM(UTC)
Steve Lapides

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 18
Location: Vienna, Virginia

The test project zip had the VB6 source plus a DLL built to work with it. The other zip is the source of that DLL, though it doesn't oome into play for this issue. Launch the test project, then hit the Group button that's in the middle frame. Custom iGrid DLL.zip (5kb) downloaded 1 time(s). Test Project.zip (34kb) downloaded 1 time(s).
Steve Lapides  
#4 Posted : Wednesday, November 13, 2019 8:25:14 PM(UTC)
Steve Lapides

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 18
Location: Vienna, Virginia

I forgot to pull out all the Protoview stuff in the project. New one is attached. Test Project.zip (7kb) downloaded 2 time(s).
Igor/10Tec  
#5 Posted : Thursday, November 14, 2019 4:12:31 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,101

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
I can't launch your project. I did compile IPDAS_iGrd.DLL, but the compilation of Form1 fails on the following line:

Code:
Dim dt As New IPDAS_Datatable.CDatatable


Is it possible to reproduce the problem in a simple project with one form containing iGrid without any dependencies? If not, may it mean that the problem is somewhere in your custom DLLs?
Steve Lapides  
#6 Posted : Friday, November 15, 2019 3:52:59 PM(UTC)
Steve Lapides

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 18
Location: Vienna, Virginia

Oops. That's a Protoview thing. Remove it.

Another totally unrelated question. Is there any way to control the formatting of the check mark for checkboxes? Like a font.bold attribute?
Igor/10Tec  
#7 Posted : Monday, November 18, 2019 6:27:48 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,101

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
I commented out that definition but got a next error 'ActiveX component can't create object' in Form_Load:

Code:
Private Sub Form_Load()

Dim dp As Object
    
Set dp = CreateObject("DirectoryPaths.CDirectoryPaths")
DocDescIni = dp.DataDir & "Common\EFSWeb Document Descriptions.ini"
PFDir = dp.ProgramFilesDir


Please, recreate the problem in a brand new sample with iGrid only. If it is a problem on the side of iGrid, you will be able to reproduce the problem easily with several rows of your data you showed earlier.

Quote:
Another totally unrelated question. Is there any way to control the formatting of the check mark for checkboxes? Like a font.bold attribute?


We use one thread to discuss just one problem. Re-ask this question in a new thread with the corresponding topic. If possible, upload a screenshot of you want to get.
Steve Lapides  
#8 Posted : Monday, November 18, 2019 1:33:41 PM(UTC)
Steve Lapides

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 18
Location: Vienna, Virginia

Sorry about that. He's an updated project with that stuff removed. Test Project.zip (7kb) downloaded 1 time(s).
Steve Lapides  
#9 Posted : Monday, November 25, 2019 1:20:38 PM(UTC)
Steve Lapides

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 18
Location: Vienna, Virginia

Igor, did you forget about this one? Plus I have two other items waiting for an response.
Igor/10Tec  
#10 Posted : Tuesday, November 26, 2019 8:08:46 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,101

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
I found the answer while debugging your code. See, you set the sort column to -1 in the Sort method of your CIGrid class:

Code:
Public Sub Sort(Optional iGrid As Object = Nothing, _
  Optional PrimaryCol As Long = -1, _
  Optional SecondaryCol As Long = -1, _
  Optional TertiaryCol As Long = -1)

If Not iGrid Is Nothing Then Set MyiGrid = iGrid

With MyiGrid.SortObject
    .ColCount = 1
    .SortOrder(1) = igSortAsc
    .SortType(1) = igSortByValueGeneral
    .SortCol(1) = PrimaryCol


When you call the Group method of iGrid, iGrid is also sorted according to the specified sort criteria. At this point it finds the improper column with the index -1 and reports about that with the error.
Steve Lapides  
#11 Posted : Wednesday, November 27, 2019 9:48:19 PM(UTC)
Steve Lapides

Rank: Member

Groups: Registered
Joined: 11/1/2019(UTC)
Posts: 18
Location: Vienna, Virginia

Thanks. I found that same bug since I sent this to you and already fixed it. Now the grouping is working. I never retried this test project since I fixed that bug a few days ago.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.