Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

ASP Datagrid - numbers being sorted like text

$
0
0
I have an ASP datagrid which was some columns that contain numbers. However, when I sort, it's sorting them alphabetically. For example:

0
1
10
2
23
30

How can I get it to sort them as numbers?

The column is defined like this:
Code:

<asp:BoundColumn DataField="RenewalCountdown" SortExpression="RenewalCountdown" HeaderText="Renewal Countdown">
    <HeaderStyle Font-Bold="True" HorizontalAlign="Left" Width="10%" CssClass="table_header_background"></HeaderStyle>
    <ItemStyle HorizontalAlign="Center" VerticalAlign="Top"></ItemStyle>
</asp:BoundColumn>

Thanks in advance...

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>