PDA

View Full Version : Problem with GridPanel sorting



magisystem
Sep 09, 2010, 9:48 AM
Hi,

i have some problem when i need to sort a gridpanel by date.
In the column i format the date in this way


<Renderer Fn="Ext.util.Format.dateRenderer('d-m-y G:i' )" />

when i click on the column header, the row was ordered in a random way.

netcooliteuser
Sep 09, 2010, 9:59 AM
:o
1.StoreID="Store1":ext:GridPanel
2. Sortable="true" :ext:Column

<ext:GridPanel ID="GridPanel1"
runat="server"
StoreID="Store1"
...

<ColumnModel runat="server">
<Columns>
...
<ext:Column Header="modifydate" Width="135" Sortable="true" DataIndex="updatedt">
<Renderer Fn="Ext.util.Format.dateRenderer('Y-m-d h:i:s')" />
</ext:Column>
....

Vladimir
Sep 09, 2010, 10:43 AM
Hi,

You have to set Type="Date" SortType="AsDate" for RecordField, in this case the sorting will be performed correctly

magisystem
Sep 09, 2010, 1:35 PM
perfect
thank yoy