Listview problem

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
vjabhiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

diasroshanCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vjabhiAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.