Hi,
I created an app using version 18.4.0.44 3 months ago.
At that time, the sort process when loading the page and the sort process when clicking the header were working.
Since then, the source of the app hasn't changed at all, but now the sort function doesn't work.
I updated to version 19.2.0.44 with NuGet and checked the app but it didn't work.
I also tried version 19.2.0.47 but it didn't work.
Please tell me how to resolve.
By the way, before, when I started the app, there was no error in DevTools of Chrome, but now I am getting the following error.
constants.js:111 Uncaught TypeError: Cannot read property 'length' of undefined
at e.modelChanged (constants.js:111)
at e.notify (constants.js:111)
at t.notify (constants.js:111)
at e.onPropertyChanged (constants.js:111)
at e.notify (constants.js:111)
at t.notify (constants.js:111)
at t.extendedPropertyChange (constants.js:111)
at t.onPropertyChanged (constants.js:111)
at t.e.dataBind (constants.js:111)
at t.dataBind (constants.js:111)
Regards,
Pylori.
Hi,
Thanks for providing your sample.
I took a look at the sample and reconfirmed my source.
I have attached my source (_ClosedTradeActionsGrid.cshtml).
The sort function works when I delete lines 113 to 114 of my source that I attached.
This logic is for initial sorting.
It used to work with this source, but now it doesn't work anymore.
As a requirement, the function to switch the sort by clicking the header as before and the initial sort function when the page is displayed are required.
Please tell me how to achieve both.
Regards,
Pylori.
|
[index.cshtml]
@using Syncfusion.EJ2
@{
List<object> cols = new List<object>();
cols.Add(new { field = "ShipCity", direction = "Descending" });
}
@(Html.EJS().Grid("ej2ClosedTradeActionsGrid")
.AllowSorting()
.AllowMultiSorting()
.SortSettings(sort => sort.Columns(cols))
.AllowSelection(false)
.AllowTextWrap()
.BeginEdit("beginEdit")
.Columns(col =>
{
---
col.HeaderText("取引時間")
.DisableHtmlEncode(false)
.Field("ShipCity")
.TextAlign(Syncfusion.EJ2.Grids.TextAlign.Center)
.Add();
----
}).Render()
)
|
Hi,
I changed the source referring to your sample and the problem was solved.
Thank you for your support.
Regards,
Pylori.