DataTable: Sort by multiple columns.
- From: Hetal <hetal.a.kapadia@xxxxxxxxx>
- Date: Wed, 29 Aug 2007 17:14:53 -0000
Hi...
We are on Visual Basic .NET 2003 and i am using DataView to sort the
DataTable. However, we are facing problems with sorting the data based
on multiple columns.
The below statement to sort the table based on 1 column works
perfectly fine.
dvShiftData is a DataView
dsScheduleData is a DataSet
dvShiftData =
dsScheduleData.Tables("ShiftData").DefaultView.Sort("bytDay Asc")
But, when we try to sort that table based on 3 columns, it does not
allow us to do so.
dvShiftData =
dsScheduleData.Tables("ShiftData").DefaultView.Sort("bytDay Asc", "Job
Position Asc", "bytHour Asc")
Is there a way we can sort a DataTable based on multiple columns?
Thanks,
Hetal.
.
- Follow-Ups:
- Re: DataTable: Sort by multiple columns.
- From: \(O\)enone
- Re: DataTable: Sort by multiple columns.
- Prev by Date: Re: HELP! How to generate HTML based on querystring
- Next by Date: Re: ***[SPAM]***
- Previous by thread: RE: Edit operations in System.Windows.Forms.WebBrowser
- Next by thread: Re: DataTable: Sort by multiple columns.
- Index(es):
Relevant Pages
|