DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 11 Jul 2007 14:04:51 -0600,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    Ronald S. Cook
          2    Cor Ligthert [MVP]


How sort DataView so blanks are at bottom, not top?   
I have a DataTable with column "Sequence".  Values are like:

Sequence
--------
5
1
3
(blank/null)
7
6
(blank/null)
4


When I create a DataView and do a sort, I get

Sequence
--------
(blank/null)
(blank/null)
1
2
3
4
5
6
7

But I need the blank/nulls to be at the end like

Sequence
--------
1
2
3
4
5
6
7
(blank/null)
(blank/null)


How can I do this, please?

Thanks,
Ron
Date:Wed, 11 Jul 2007 14:04:51 -0600   Author:  

Re: How sort DataView so blanks are at bottom, not top?   
Ronald,

The only thing I can think about what uses a short answer is:
Add an extra column with the contents of your column
Replace in that column all spaces by ZZZZZZ (or any other high value)
Use that as the sort item.

Cor

"Ronald S. Cook"  schreef in bericht 
news:%23wecFb$wHHA.4588@TK2MSFTNGP03.phx.gbl...

>I have a DataTable with column "Sequence".  Values are like:
>
> Sequence
> --------
> 5
> 1
> 3
> (blank/null)
> 7
> 6
> (blank/null)
> 4
>
>
> When I create a DataView and do a sort, I get
>
> Sequence
> --------
> (blank/null)
> (blank/null)
> 1
> 2
> 3
> 4
> 5
> 6
> 7
>
> But I need the blank/nulls to be at the end like
>
> Sequence
> --------
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> (blank/null)
> (blank/null)
>
>
> How can I do this, please?
>
> Thanks,
> Ron
> 
Date:Sat, 14 Jul 2007 06:31:41 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us