DataView.Sort and CurrentCulture

  • Thread starter Thread starter Pål Andreassen
  • Start date Start date
P

Pål Andreassen

I'm using DataView.Sort to sort a dataset containing data with Norwegian
Special Characters. Even thou Thread.CurrentThread.CurrentCulture is
correctly set to Norwegian Bokmaal the Norwegian characters are sorted in
the wrong order.

Does DataView.Sort not respect the CurrentCulture? Is there anyway to
overrride the Sort method so that I can handle this problem my self?
 
I haven't used Norwegian but I haven't noticed a problem when I've done it
with Spanish. Can you post the code though and the values - I can try to
replicate it and see if I can find anything.

Bill
 
I'm never sorted a DataTable in DataSet nor DataView, so I don't know the
correct answer, but I know that DataSet has a property Locale, which VS .NET
assigns a value in InitializeComponent() of a page.

this.xxxxxxDataSet.Locale = new System.Globalization.CultureInfo("en-US");

I didn't find equal property for DataView class, so I don't know how it
works.

JMu
 
I'm never sorted a DataTable in DataSet nor DataView, so I don't know
the correct answer, but I know that DataSet has a property Locale,
which VS .NET assigns a value in InitializeComponent() of a page.

this.xxxxxxDataSet.Locale = new
System.Globalization.CultureInfo("en-US");

I didn't find equal property for DataView class, so I don't know how
it works.

Thank a million. By setting the CultureInfo in the dataset to nb-NO the
sortorder worked as I wanted it to.

But what is the default Locale settings for a dataset? The solution is
runing on a server with Norwegian Bokmaal (nb-NO) as the default regional
settings so I imagined that the DataSet would have this too. All other
region dependent things like datetime formatting etc comes back
Norwegian.
 
Back
Top