M
Mr. B
What I'm trying to do is to Add the information of Two Tables into a single
ListView. The ListView has 10 columns.
The following Code populates the LV columns 1 to 5 (or rather 0 to 4) from a
DataSet...
Private Sub MstrEmPay()
Dim dtDataTbl As DataTable = DsMstrEmPay.MASTER_PRM_EMPLOYEE_PAY
' Get Info from Data Base
For cntr = 0 To DsMstrEmPay.MASTER_PRM_EMPLOYEE_PAY.Rows.Count - 1
Dim dr As DataRow = dtDataTbl.Rows(cntr)
Dim LItem As New ListViewItem
Dim rowTtl As Double = 0
LItem = New ListViewItem
LItem.Text = dr("amount")
LItem.SubItems.Add(dr("employee"))
LItem.SubItems.Add(dr("pay_id"))
LItem.SubItems.Add(dr("pay_type"))
lvProjDisplay.Items.Add(LItem)
Next ' cntr
End Sub
What I want to do is to get the info of another DataSet and dump it's info
into the next 5 remaining Columns (starting at the first row of the
ListView).
I've done some reading and I 'think' I need something like:
LItem.SubItems.Insert(5, myTextHere)... but haven't found how to make this
work.
Anyone can help?
Regards,
Bruce
ListView. The ListView has 10 columns.
The following Code populates the LV columns 1 to 5 (or rather 0 to 4) from a
DataSet...
Private Sub MstrEmPay()
Dim dtDataTbl As DataTable = DsMstrEmPay.MASTER_PRM_EMPLOYEE_PAY
' Get Info from Data Base
For cntr = 0 To DsMstrEmPay.MASTER_PRM_EMPLOYEE_PAY.Rows.Count - 1
Dim dr As DataRow = dtDataTbl.Rows(cntr)
Dim LItem As New ListViewItem
Dim rowTtl As Double = 0
LItem = New ListViewItem
LItem.Text = dr("amount")
LItem.SubItems.Add(dr("employee"))
LItem.SubItems.Add(dr("pay_id"))
LItem.SubItems.Add(dr("pay_type"))
lvProjDisplay.Items.Add(LItem)
Next ' cntr
End Sub
What I want to do is to get the info of another DataSet and dump it's info
into the next 5 remaining Columns (starting at the first row of the
ListView).
I've done some reading and I 'think' I need something like:
LItem.SubItems.Insert(5, myTextHere)... but haven't found how to make this
work.
Anyone can help?
Regards,
Bruce