jaosobne Posted October 22, 2018 Posted October 22, 2018 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 Quote
Sherzod Posted October 22, 2018 Posted October 22, 2018 Hi, We will check this, which build are you using ? Quote
jaosobne Posted November 6, 2018 Author Posted November 6, 2018 Hi Sherzod , did you found some solution for that ? BR Quote
Sherzod Posted November 6, 2018 Posted November 6, 2018 On 10/22/2018 at 7:18 PM, jaosobne said: Client side sorting Hi, Sorry for the delay, Can you make a simple testcase for this ?! Quote
jaosobne Posted November 6, 2018 Author Posted November 6, 2018 Here it is .. ClientSideSort.zip Quote
Sherzod Posted November 6, 2018 Posted November 6, 2018 Ok, Thanks for the testcase I will check Quote
Mike Posted November 18, 2018 Posted November 18, 2018 Hi, I have already submitted a ticket about this issue but didn't receive any response. It is almost two weeks ago so hope someone has a workaround. Quote
Volk65 Posted November 19, 2018 Posted November 19, 2018 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. Quote
jaosobne Posted November 20, 2018 Author Posted November 20, 2018 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.. Quote
Mike Posted November 20, 2018 Posted November 20, 2018 Thank you. However I find it annoying that my ticket still hasn't been answered. Quote
Sherzod Posted November 21, 2018 Posted November 21, 2018 Hello, Sorry for the late reply If you will use the pagination, you should use server-side sorting anyway Quote
jaosobne Posted November 21, 2018 Author Posted November 21, 2018 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 Quote
Sherzod Posted November 21, 2018 Posted November 21, 2018 Ok, but are you using the pagination? Quote
Mike Posted November 27, 2018 Posted November 27, 2018 Hi, It is already three weeks ago I started a ticket about this. Still no response. Quote
Sherzod Posted November 27, 2018 Posted November 27, 2018 Hi Mike, Can you tell me, are you using the pagination in a grid?! Quote
Mike Posted November 27, 2018 Posted November 27, 2018 Hi, Yes I am using pagination in a grid. This is necessary because of the large amout of records. Quote
Sherzod Posted November 27, 2018 Posted November 27, 2018 1 hour ago, Mike said: Hi, Yes I am using pagination in a grid. This is necessary because of the large amout of records. Hi, But, in this case, sorting will not work as a whole (I do not mean the date column) Quote
Mike Posted November 27, 2018 Posted November 27, 2018 I understand that but would be a workaround for it? Quote
Sherzod Posted November 28, 2018 Posted November 28, 2018 If you use pagination, you need server-side sorting. Quote
jaosobne Posted November 28, 2018 Author Posted November 28, 2018 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 ? Quote
Sherzod Posted November 28, 2018 Posted November 28, 2018 51 minutes ago, jaosobne said: Is there some issue that we can't have set column type to date type at time of table creation ? This can be done by changing the type of the field of storeModel I guess Quote
jaosobne Posted November 28, 2018 Author Posted November 28, 2018 1 hour ago, Sherzod said: This can be done by changing the type of the field of storeModel I guess This can be done by myself somehow ? Quote
Mike Posted February 21, 2019 Posted February 21, 2019 Any suggestions how to change the field of storeModel? Quote
jaosobne Posted February 21, 2019 Author Posted February 21, 2019 I don’t think so. The only solution is as I write earlier... You must create a hidden container, place here uniDateTimePicker as a column editor and set the grid ReadOnly to false. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.