Jump to content

Date column sort error in unimdbgrid


odoncm

Recommended Posts

Hi,

When in a uniMdbgrid we sort by a date field, the sort is not done correctly, since it would have to sort by the complete date and it seems that it is sorting by the month field.

 

Ordered column date:

procedure Tfrm_albaranes_abiertos.unmdbgrd_albaranes_abiertosColumnSort
  (Column: TunimDBGridColumn; Direction: Boolean);
begin
  if Direction then
    dm.qry_albaranes_abiertos.IndexFieldNames := Column.FieldName + ' DESC'
  else
    dm.qry_albaranes_abiertos.IndexFieldNames := Column.FieldName + ' ASC'
end;

And in UniEvents:

function store.afterCreate(sender)
{
      sender.setRemoteSort(false);
}

Any ideas?

I attach the wrong sorting image in the Unimdbgrid and the correct sorting in this case in a grid of the dataset itself.

Thanks

https://photos.app.goo.gl/wFuhtjHcmEDJAouLA

https://photos.app.goo.gl/5atWJrYV1bcZiroz8

 

Link to comment
Share on other sites

1 hour ago, odoncm said:

I attach the wrong sorting image in the Unimdbgrid and the correct sorting in this case in a grid of the dataset itself.

Hello,

It seems in both pictures the sorting is correct !?

Wich edition and build of UniGUI are you using?

Link to comment
Share on other sites

×
×
  • Create New...