[FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work

  1. #1

    [FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work

    *I have a grid hooked up to a store with a LastName field. *The field has SortType=AsUCString, but it is still doing a case sensitive sort. *The page source shows:*

    Ext.data.JsonReader({fields:[{sortType:"AsUCString",name:"LastName"},{name:"FirstName"}]})

    "AsUCString" on the clientside shouldn't have a capital "A"?




  2. #2

    RE: [FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work

    Hi Jacky,

    Good catch. We'll fix immediately.*


    Geoffrey McGill
    Founder
  3. #3

    RE: [FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work

    Hi Jacky,

    Ok, this should be fixed now. I added a new "ToCamelCaseConverter" to properly render that property in the configuration script.*


    Thanks again for pointing out the problem.*


    Geoffrey McGill
    Founder
  4. #4

    RE: [FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work

    Awesome, thanks!
  5. #5

    RE: [FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work

    hmm...this still doesn't seem to work. *I see that the javascript outputs *SortType="asUCString" correctly. *Is it because I am using JsonReader?
  6. #6

    RE: [FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work

    Hi,

    What problems do you have? asUCString is default sort type if Type="String". If set explicitly SortType="AsUCString" then it works also. Here is my test case

    <%@ Page Language="C#" %>
    <%@ Import Namespace="System.Collections.Generic"%>
    
    <%@ 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></title>
        
        <script runat="server">
            protected void Page_Load(object sender, EventArgs e)
            {
                var data = new List<object>
                               {
                                   new {Common="B"},
                                   new {Common="C"},
                                   new {Common="A"},
                                   new {Common="b"},
                                   new {Common="c"},
                                   new {Common="a"}
                               };
                Store1.DataSource = data;
                Store1.DataBind();
            }
        </script>
    </head>
    <body>
        <ext:ScriptManager ID="ScriptManager1" runat="server" StateProvider="None" />
        
        <ext:Store runat="server" ID="Store1" AutoLoad="true">
            <Reader>
                <ext:JsonReader>
                    <Fields>
                        <ext:RecordField Name="Common" SortType="AsUCString" />                   
                    </Fields>
                </ext:JsonReader>
            </Reader>
            <SortInfo Field="Common" Direction="ASC" />
        </ext:Store>
        
        <ext:Window ID="Window1" 
            runat="server" 
            Title="Window" 
            Height="500" 
            Width="500">
            <Body>
                <ext:FitLayout ID="FitLayout1" runat="server">
                    <ext:GridPanel 
                        ID="GridPanel1" 
                        runat="server" 
                        AutoExpandColumn="Common" 
                        Title="Plants" 
                        Frame="false" 
                        StoreID="Store1">
                        <ColumnModel ID="ColumnModel1" runat="server">
                            <Columns>
                                <ext:Column ColumnID="Common" Header="Common Name" DataIndex="Common" Sortable="true" />                        
                            </Columns>
                        </ColumnModel>
                    </ext:GridPanel>                            
                </ext:FitLayout>
            </Body>
        </ext:Window>    
    </body>
    </html>
  7. #7

    RE: [FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work



    Add a pager to your example, and sorting will no longer be case insensitive.

    
    
    <BottomBar>
     <ext:PagingToolbar ID="PagingToolBar1" runat="server" StoreID="store1" PageSize="25">
     </ext:PagingToolbar>
    </BottomBar>
  8. #8

    RE: [FIXED] [V0.8.0] Store Field SortType AsUCString doesn't work

    Hi,

    Fixed. Please update*

Similar Threads

  1. Replies: 3
    Last Post: Feb 22, 2012, 12:56 PM
  2. Replies: 3
    Last Post: Jun 13, 2011, 4:17 PM
  3. [CLOSED] [1.0] Set Default SortType of RecordField to AsUCString
    By schimkem in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 05, 2010, 4:04 PM
  4. Replies: 1
    Last Post: Oct 26, 2008, 5:49 PM
  5. Replies: 2
    Last Post: Mar 26, 2008, 9:41 AM

Posting Permissions