DotnetDude
DotnetDude

Reputation: 11807

DataView Sort - C#/ASP.NET

I am using the DataView.Sort to sort a column in the dataset. By default, does this assume the data is of type string when it does a sort. If so, how do I make it be datatype aware?

EDIT: How does it infer the datatype? I am creating a dataset from scratch

Upvotes: 1

Views: 1207

Answers (1)

Joel Coehoorn
Joel Coehoorn

Reputation: 415735

.Sort will honor the datatype of the column. Now, if you've already converted the column to a string type for display you have a problem. But if it's still a datetime then you're okay.

Upvotes: 1

Related Questions