[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Listview problem

Posted on 2004-11-17
2
Medium Priority
?
402 Views
Last Modified: 2013-12-26
Hi all ,
I am using power builder 6.5.
i am trying to fill values in listview using DataWindow Control.
Listview1 is using Datawindow1 and listview2 is using datawindow2. Listview1 is getting populated while listview2 doesnt.
Listview1 also display some blank rows. How can i avoid them?
For listview1 i can scroll through data in datawindow1 also but for second listview2,  in Datawindow2 i am unable to scroll through. but i can see values getting populated.
what could be the reason. I am using same code to populate both the listview.
code is below............
for li_Count = 1 to dw_2.RowCount()
                         l_lvi.Label =      String(dw_2.GetItemNumber(li_Count, "bill_ref_no")) + "~t" + &
                                                  String(Date(dw_2.GetItemDateTime(li_Count, "ppdd_date"))) + "~t" + &
                                                  String(Date(dw_2.GetItemDateTime(li_Count, "closed_date"))) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "new_charges")/100) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "total_due")/100) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "total_adj")/100) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "total_paid")/100) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "balance_due")/100)
                         
                         l_lvi.Data = dw_2.GetItemNumber(li_Count, "bill_ref_no")
                         lv_invoice.AddItem(l_lvi)
                    Next

Is there any other way to populate listview??
Is there any way to disply gridlines for Listview in Powerbuilder 6.5.

Thanks for your help.
Abhishek
0
Comment
Question by:vjabhi
2 Comments
 
LVL 18

Accepted Solution

by:
diasroshan earned 1000 total points
ID: 12611759
hi,

one observation i have is in the following syntax...

  l_lvi.Label =      String(dw_2.GetItemNumber(li_Count, "bill_ref_no")) + "~t" + &
                                                  String(Date(dw_2.GetItemDateTime(li_Count, "ppdd_date"))) + "~t" + &
                                                  String(Date(dw_2.GetItemDateTime(li_Count, "closed_date"))) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "new_charges")/100) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "total_due")/100) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "total_adj")/100) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "total_paid")/100) + "~t" + &
                                                  String(dw_2.GetItemNumber(li_Count, "balance_due")/100)
                         


in the above syntax...

wherever there is a divide by hundred have a check that the numerator is not null else ur above syntax fails...

check the values as ...

ll_charges = dw_2.GetItemNumber(li_Count, "new_charges")
If Isnull(ll_charges) Then ll_charges = 0      

If numerator is 0 no problem but check for null...
once u do this ur 2nd listbox will populate...

Let me know if u need more assistance...

Cheers,
Rosh
0
 

Author Comment

by:vjabhi
ID: 12611893
Hi,

I have changes.. actually have to do validation for all as there were some date fields also...
Can we display gridlines for listview??

i am using PB 6.5

Thanks a lot.
Abhishek

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question