A
Andy Baker
I have an invoicing application written in VB.NET 2003. The current invoice
is stored in a dataset, called DSInvoice, containing code, description,
quantity and price fields. It is bound to a datagrid to display it on
screen. I want to display the invoice lines on screen in the order in which
they are added, but when I print the invoice I want to print them in stock
code order. I am trying to use a DataView to do this, but cannot get it to
work. The code that I am using is:
Dim DVinvoice As DataView
DVInvoice = New DataView(DSInvoice.Tables("Details"))
DVInvoice.Sort = "Code ASC"
but this has no effect on the sort order of the DataView, it remains in the
same order as the original dataset. Is it something that I am doing wrong,
or does it need to be done differently with the Compact Framework? Thanks in
advance.
Andy Baker
is stored in a dataset, called DSInvoice, containing code, description,
quantity and price fields. It is bound to a datagrid to display it on
screen. I want to display the invoice lines on screen in the order in which
they are added, but when I print the invoice I want to print them in stock
code order. I am trying to use a DataView to do this, but cannot get it to
work. The code that I am using is:
Dim DVinvoice As DataView
DVInvoice = New DataView(DSInvoice.Tables("Details"))
DVInvoice.Sort = "Code ASC"
but this has no effect on the sort order of the DataView, it remains in the
same order as the original dataset. Is it something that I am doing wrong,
or does it need to be done differently with the Compact Framework? Thanks in
advance.
Andy Baker