PDA

View Full Version : ext grid with groupfield and finally i need to sort with date plaese help me with example



Yaganteeswarudu
Jun 02, 2017, 7:38 AM
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

fabricio.murta
Jun 02, 2017, 2:24 PM
Hello @Yaganteeswarudu!

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

Albeit confuse, I believe you want to do what's in our example here: Grid Panel - Miscellaneous - Grouping (https://examples4.ext.net/#/GridPanel/Miscellaneous/Grouping/).

Please take your time looking over the examples available on the examples explorer (https://examples4.ext.net/) (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 (http://forums.ext.net/showthread.php?61176-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?