Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
order by ascending the numbers of CompanyID in this code line

What I have tried:

DataRow[] RowslstAvailableSuppliers = dtAllSupplier.Select("CompanyID not in (" + oCompanyBO.SelectedSupplierIDs.ToString() + ") ");
Posted
Updated 17-Jun-16 21:47pm
v2
Comments
BillWoodruff 18-Jun-16 3:48am    
A key question here is whether you want to sort the data after you have retrieved it, or whether (as OriginalGriff's answer shows) you want the database to sort it before/as you retrieve it.

1 solution

Assuming that returns the rows you want, try:
C#
...Select("CompanyID not in (" + oCompanyBO.SelectedSupplierIDs.ToString() + ") ORDER BY CompanyID ASC");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900