[FIXED] [V0.8.0] Sorting numbers with ext:TableGrid

  1. #1

    [FIXED] [V0.8.0] Sorting numbers with ext:TableGrid


    Here's something that has more to do with HTML than purely coolite, but perhaps someone can through a light on the matter.

    When I make simple html table and add the <ext:TableGrid> to enclose it, the columns that are populated with just numbers, are always aligned to the left - ignoring the Align="right" tag in the <TD> - and bringing along the problem to sort these columns, as it sorts them just as text, making "111" to go first than "22", just because sorts from left to right. Not as numbers but as strings.

    I tried to left pad spaces to the numbers, but even thought they are rendered, the text keeps aligning always to the left.

    any clues?

  2. #2

    RE: [FIXED] [V0.8.0] Sorting numbers with ext:TableGrid

    Hi Nestor,

    I'm looking into this. I think we should be able to get this working.


    Geoffrey McGill
    Founder
  3. #3

    RE: [FIXED] [V0.8.0] Sorting numbers with ext:TableGrid

    Great. Thanks! I'll keep checking this discussion.
  4. #4

    RE: [FIXED] [V0.8.0] Sorting numbers with ext:TableGrid

    Hi,

    We fixed it. Now the TableGrid has Fields and Columns property when you can specified type and other params.
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Converting table into GridPanel - Coolite Toolkit Example</title>
        <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
        
        <style type="text/css">
            #data { width:400px; border:1px solid #bbb; border-collapse:collapse; }
            #data td, #data th { border:1px solid #ccc; border-collapse:collapse; padding:5px; }
        </style>
    </head>
    <body>
        <ext:ScriptManager ID="ScriptManager1" runat="server" />
        
        <h1>Convert an existing HTML &amp;lt;table> into a simple GridPanel</h1>
        
        <ext:TableGrid runat="server" Table="data" StripeRows="true">        
            <Fields>
                <ext:RecordField Type="String"></ext:RecordField>
                <ext:RecordField Type="Int"></ext:RecordField>
                <ext:RecordField Type="String"></ext:RecordField>
            </Fields>
            <Columns>
                <ext:Column Header="NameC"></ext:Column>
                <ext:Column Align="Right"></ext:Column>
                <ext:Column></ext:Column>
            </Columns>        
        </ext:TableGrid>
        
        <table style="visibility:hidden;" id="data">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Age</th>
                    <th>Gender</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Barney Rubble</td>
                    <td>32</td>
                    <td>Male</td>
                </tr>
                <tr>
                    <td>Fred Flintstone</td>
                    <td>33</td>
                    <td>Male</td>
                </tr>
                <tr>
                    <td>Betty Rubble</td>
                    <td>32</td>
                    <td>Female</td>
                </tr>
                <tr>
                    <td>Pebbles</td>
                    <td>111</td>
                    <td>Female</td>
                </tr>
                <tr>
                    <td>Bamm Bamm</td>
                    <td>2</td>
                    <td>Male</td>
                </tr>
            </tbody>
        </table>
    </body>
    </html>
  5. #5

    RE: [FIXED] [V0.8.0] Sorting numbers with ext:TableGrid

    Is that available in 0.7 ? I supose not, so..... how do I get 0.8.0 ?

    Thanks!!!!
  6. #6

    RE: [FIXED] [V0.8.0] Sorting numbers with ext:TableGrid

    Any news Vladimir??

Similar Threads

  1. Format numbers
    By idtny in forum 1.x Help
    Replies: 5
    Last Post: Apr 17, 2014, 4:31 PM
  2. TableGrid selector
    By alemonnier in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 30, 2011, 10:22 AM
  3. [CLOSED] What is Ext:TableGrid?
    By jchau in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 26, 2011, 5:31 PM
  4. Excel export, with numbers
    By FreddieBooo in forum 1.x Help
    Replies: 0
    Last Post: Jun 01, 2010, 5:46 AM
  5. serial numbers in grid
    By harshad.jadhav in forum 1.x Help
    Replies: 2
    Last Post: Mar 19, 2010, 2:32 AM

Posting Permissions