Home All Groups Group Topic Archive Search About
Author
21 Jun 2006 9:09 AM
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

Author
21 Jun 2006 11:45 AM
Hege Servold
10 and 11 are shown after 1 because the values are sorted as strings, not as
integers.
--
Hege Servold
hege.servold(AT)bekk.no


Show quoteHide quote
"Julia" wrote:

> 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
Author
21 Jun 2006 12:18 PM
Julia
Hi

Yes, that helped!

Thanks
Julia

Show quoteHide quote
"Hege Servold" wrote:

> 10 and 11 are shown after 1 because the values are sorted as strings, not as
> integers.
> --
> Hege Servold
> hege.servold(AT)bekk.no
>
>
> "Julia" wrote:
>
> > 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