Print Page | Close Window

Listview subitems error

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=13448
Printed Date: 23 November 2024 at 11:30am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Listview subitems error
Posted By: wakerunner
Subject: Listview subitems error
Date Posted: 18 February 2009 at 5:34pm

I get an error anytime I reference the listviews subitems. The code below works with MS's listview control but not Codejocks.

ctrlReminders.ListItems.Item(1).SubItems(1) = "anything"




Replies:
Posted By: Oleg
Date Posted: 19 February 2009 at 3:01am
Hi,
Do you have Report view ?
 
Just created new project, added such code and it works.
 
Private Sub Form_Load()
ListView1.View = xtpListViewReport
ListView1.ColumnHeaders.Add , , "Column1", 1000
ListView1.ColumnHeaders.Add , , "Column2", 1000
ListView1.ListItems.Add , , "Item"
ListView1.ListItems.Item(1).SubItems(1) = "anything"

End Sub


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: wakerunner
Date Posted: 19 February 2009 at 10:58am
Sorry to waste your time, I must have been working too late last night, I didn't have the .view set to listviewreport.
 
Thank You


Posted By: ReiSenador
Date Posted: 04 September 2010 at 4:05am
Good Day, im new to CJ listview and i find it amazing but.. i have and error here.
While Not rs.EOF
                    Set item = .ListItems.Add(, , rs.Fields("salesid"), 1, 1) <------------- it says wrong number of arguments. <.add> is highlighted
                    item.SubItems(1) = rs.Fields("Purchased_Date")
                    item.SubItems(2) = rs.Fields("CustomerName")
                    item.SubItems(3) = rs.Fields("item1")
                    item.SubItems(4) = rs.Fields("item1_qty")
                    item.SubItems(5) = rs.Fields("item1_pr").... so on

this is working 100% in my vb6 listview but when i switch it to cj listview i got this error.
i know i got it a wrong syntax maybe, and can you help me?


-------------
Learn it.


Posted By: ReiSenador
Date Posted: 04 September 2010 at 4:52am
nevermind, i figure it out. 

-------------
Learn it.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net