TMSWebCore version 2.1.x and TWebTableControl with DataTables problem

Hi,

I'm using javascript DataTables in my production project for sorting, searching etc., and everything was ok until TMS Web Core v 2.1.
In attachement project to repro the problem.
DataTables.zip (1.7 MB)

I checked the attached project on v 2.0.5.0 and is ok but on v 2.1.0.2 I have a problem with get proper Table.cells[] value.

Repro steps:

  1. Click "Fill example data"
  2. Click row in the grid

You can see that on v 2.0.5.0 is ok (after click row with value Value1_9 i got Clicked Value1_9)

  1. Sort the column using DataTables, click on the Header2 header.

version 2.0.5 below is ok.

version 2.1.0.2 is wrong I clicked Value1_3 but got Value1_8?

Why DataTables does not work properly with version 2.1.x ?
I have in application many places where I used the DataTables feature. It should work like in versions before 2.1.x

I have no idea. We have not developed DataTables, so we have no understanding how it works internally. From your description, I would assume this does not involve our components, just Object Pascal compiled with pas2js dealing with DataTables.
It is impossible for us to debug every possible combination with external JavaScript libs and custom user code.

Hi,

I'm sure for 95% that this is a problem in new TWebTableControl component in v 2.1.x.
I attached the example project for reproduce the problem. Did you run the example?
Maybe good idea will be run the example with previous TWebTableControl (from v 2.0.5 version) and see if the problem still occurs. After that we will be 100% sure that this is not pas2js but TWebTableControl.
Could you check this?

Currently for me this is huge problem to port my app to the newest TMS Web Core version, and if the problem will not solve I have to stay on v 2.0.5 forever :slight_smile:

Your original post referred to DataTables and nowhere it referred to TWebTableControl?

DataTables is something completely different
https://datatables.net/

Hi,

In the topic you have "TWebTableControl with DataTables"

DataTables is only wrapper to the table element which in this case is TMS Web Core TWebTableControl. That's why I've included simple example project to reproduce the problem.

It is unexpected an external JavaScript library is used with TWebTableControl to use operations like sorting as TWebTableControl has built-in sort methods already. This conflicts.
Regardless, we made a change to still allow this but this is not recommended use and sorts of usage we cannot guarantee to continue to work.

Ok ... thank you for making DataTables possible with TWebTableControl still ... I had to use DataTables in the past because the TWebTableControl had no such features like searching (full text search) , paging and soting via columns.
DataTables is great external library giving tables in the WEB Core App all needed features (as you know that DataTables initial options list is very long and flexible and offers many more possibilities than currently
bulit-in TWebTableControl features) and it is only a fiew lines to enable it in the TMS Web Core App project.

I think that for TWebTableControl disabled the DataTables in the future is kind of limitation for TMS Web Core but I understand your point of view.

Btw, you said that currently TWebTableControl has build-in sort via table column. How can I enable this feature. Maybe some example project or demo for TWebTableControl?

Call tablecontrol.Sort() from a cell click event for example.

Thank you very much ... I can confirm that DataTables works fine again on the newest version TMS Web Core 2.1.2.0.
I hope that it will be the same in the future :)

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.