The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

ext grid with groupfield and finally i need to sort with date plaese help me with example

  1. #1

    ext grid with groupfield and finally i need to sort with date plaese help me with example

    See the following example

    <ext:GridPanel
    ID="grdFaults"
    runat="server"
    Collapsible="true"
    MinWidth="1040"

    RowLines="true" Height="250" Resizable="false"
    Frame="true"
    Scroll="Vertical"
    Header="false" Sortable Columns="false" EnableColumnHide="false" EnableColumnResize="true"
    EnableColumnMove="false" Border="false" ForceFit="true" ClientIDMode="Static" >

    <Store>
    <ext:Store ID="strFaults" runat="server" GroupField="LegInfo">
    <Model>
    <ext:Model runat="server">
    <Fields>
    <ext:ModelField Name="LegInfo" />

    <ext:ModelField Name="Occured" />
    <ext:ModelField Name="Source" />
    <ext:ModelField Name="Destination" />

    </Fields>
    </ext:Model>
    </Model>

    </ext:Store>
    </Store>
    <ext:Grouping
    runat="server"
    HideGroupedHeader="true"
    GroupHeaderTplString='LEG INFO : {name} ({[values.rows.length]} {[values.rows.length
    > 1 ? "Faults" : "Fault"]})' />
    </ext:GridPanel>


    output is generated as

    LegInfo1
    ---------------------------------

    date suorce destination

    1-2-2017 abv xyz
    2-2-2017 nnmn lmn
    5-2-2017 hhb jjj
    12-2-2017 nn mmm


    Leginfo2
    --------------------------------

    date suorce destination
    19-3-2017 abv xyz
    20-3-2017 nnmn lmn
    21-3-2017 hhb jjj
    22-3-2017 nn mmm




    Leginfo3
    -------------------------------------
    date suorce destination

    14-2-2017 abv xyz
    15-2-2017 nnmn lmn
    16-2-2017 hhb jjj
    17-2-2017 nn mmm

    Here the Leginfo field is grouping filed

    here my requirement is i need to group the Leginfofield and then i need to sort the leginfo which contains latest date comes firts

    like expected output

    Leginfo2
    --------------------------------

    date suorce destination
    19-3-2017 abv xyz
    20-3-2017 nnmn lmn
    21-3-2017 hhb jjj
    22-3-2017 nn mmm


    Leginfo3
    -------------------------------------
    date suorce destination

    14-2-2017 abv xyz
    15-2-2017 nnmn lmn
    16-2-2017 hhb jjj
    17-2-2017 nn mmm

    LegInfo1
    ---------------------------------

    date suorce destination

    1-2-2017 abv xyz
    2-2-2017 nnmn lmn
    5-2-2017 hhb jjj
    12-2-2017 nn mmm
  2. #2
    Hello @Yaganteeswarudu!

    Would you mind editing your post and wrapping your code blocks between [code][/code] blocks?

    Albeit confuse, I believe you want to do what's in our example here: Grid Panel - Miscellaneous - Grouping.

    Please take your time looking over the examples available on the examples explorer (like the one linked above). I'm sure you are going to find illustrations of several things you'd love to do with Ext.NET and didn't know it was even possible!

    Please also review our thread on posting runnable test cases, as it will help us a lot help you! Here it is: Tips for creating simplified code samples

    Last, but not least... I think you may have posted in the wrong forum, as you are using in your code block a component that's not in Ext.NET Mobile! :)

    Would you be as kind as to let us know which version of Ext.NET you are using and asking help for?
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] grid sort -- How to do both single & multi sort
    By susanz in forum 3.x Premium Help
    Replies: 6
    Last Post: Dec 11, 2015, 3:28 PM
  2. [CLOSED] GroupField : GroupField value not showing
    By matrixwebtech in forum 2.x Premium Help
    Replies: 3
    Last Post: Mar 12, 2015, 11:17 AM
  3. [CLOSED] Sort by date in GridPanel
    By vadym.f in forum 1.x Premium Help
    Replies: 4
    Last Post: Jun 19, 2012, 7:47 PM
  4. Replies: 2
    Last Post: Sep 08, 2011, 7:17 PM
  5. Replies: 1
    Last Post: Feb 15, 2011, 5:45 PM

Posting Permissions

Subscribe now to get the latest Ext.NET happenings in our newsletter.