Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Listview subitems error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Listview subitems error

 Post Reply Post Reply
Author
Message
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post Topic: Listview subitems error
    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"

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
wakerunner View Drop Down
Groupie
Groupie


Joined: 29 September 2007
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote wakerunner Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ReiSenador View Drop Down
Newbie
Newbie


Joined: 04 September 2010
Location: Philippines
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ReiSenador Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
ReiSenador View Drop Down
Newbie
Newbie


Joined: 04 September 2010
Location: Philippines
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ReiSenador Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2010 at 4:52am
nevermind, i figure it out. 
Learn it.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.