Jump to content

Client side sorting on date column doesn't work properly


Recommended Posts

Hi,

Client side sorting on date column doesn't work properly .

Date is sorted like text not by date if uniDBGrid is set as read only.

And sorting only work if the column have uniDateTimePicker as editor and is set ReadOnly to false.

Can I set some JS to set that column to date type and get client side sorting to work properly ???  

Thanks

 

Link to post
Share on other sites
  • 2 weeks later...
  • 2 weeks later...

Hello, I have version 1480.
I think it has to do with previous reports.
On the server (MSSQL), the dataset is returned sorted by date. And the server sorts correctly (naturally). There is no JS code on UniDBGrid. Here's what I see (attach).
If I say that sorting by date - everyone will laugh.

 

Screenshot_39.png

Link to post
Share on other sites

hi guys, problem is in that the column is set to text field and JS sorts it as text not as date type. If we define editor property of that column as datetimepicker then that column has xform property as some date type if i remember it correctly and sorting on client side works properly.

It doesn’t depends on sql server , i’m using mysql and testcase is on clientdataset.

I can make some dumps from debuger when i will be at pc..

Link to post
Share on other sites

Hi Sherzod ,

I don't want to use server side sorting because it is slowe then client side .

Best should be if you can set correct field type at grid create time to xtype datefield and not textfield.

here is dump from console :

MainForm.grid.getColumnManager().columns[4].editor
{xtype: "textfield", uform: constructor, focusDisabled: true, isCellEditor: true}

and JS Code from index

O5D = new Ext.grid.column.Column({
                        ogrid: O13,
                        sortable: false,
                        dataIndex: "4",
                        renderer: _rndcll_,
                        rdonly: false,
                        text: "HireDate",
                        cf: "**j.n.Y",
                        ct: "datetime",
                        width: 112,
                        editor: {
                            xtype: "textfield"
                        }
                    });

please check it in the test case , first column "Hire date" doesn't have editor and second has unidatetimepicker as editor and working correctly.

Project1.zip

Link to post
Share on other sites

Hi, yes it is possible that we need server side sorting with pagination because in store we have only records that are currently paged .

I show only filtered records, it's intranet app and client side sorting is more quicklier than server side sorting.

Is there some issue that we can't have set column type to date type at time of table creation ?    

Link to post
Share on other sites
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...