Sorting DataView problem

J

Julia

Hi

I have a control including a DataGrid. The DataGrid is bound to a DataView.
The first column of the DataGrid contains numbers from 1, 2, 3, 4, ... I want
to show them in order so I edit the sort property of the DataView like this:
dvDocumentKind.Sort = "DocumentInfo_No";

When i run the page the order in the DataGrid is shown like this: 1, 10, 11,
2, 3, 4, 5, 6, 7, 8, ,9, 12, 13, .... 19, 20, 21, 22 etc. Why is 10 and 11
shown after 1?

Thanks
Julia
 
H

Hege Servold

10 and 11 are shown after 1 because the values are sorted as strings, not as
integers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top