Editor datatable row positioning and DataTables Search

Editor datatable row positioning and DataTables Search

menashemenashe Posts: 198Questions: 44Answers: 2

Two questions:

1) The Editor examples with "type: datatable" use a small dataset, so all of the values fit in the datatable. Am I missing something, because I assume that there is a way to make the selected value appear within the datatable window? Can I make the selected value appear at the top -- or middle -- of the datatable window??
(When I open for Edit, the proper value is selected/highlighted, just way down in the window, out of view.)

2) DataTables Search (at the top right of the page): Can I specify an alternate SQL to use for searching? When searching, I would like to be able to show rows that contain values in linked tables, even the I do not show them in the DataTable.

Hope this is clear!

Answers

  • allanallan Posts: 63,572Questions: 1Answers: 10,482 Site admin

    1 - Are you using scrolling in the DataTable? If so, the first selected row will automatically be scrolled into view starting with Editor 2.1 (release very soon). If you are using paging without scrolling, then it should already be paging to the page with the first row selected.

    2 - SQL? Are you using server-side processing for this table? I think you might need to illustrate what you are looking for with an example for this one.

    Thanks,
    Allan

  • menashemenashe Posts: 198Questions: 44Answers: 2

    I did want to get back to this previously-asked rephrased question.

    In the built-in DataTables Search (at the top right of the page, shown in the image below): Can I specify an alternate SQL to use for searching? In other words, if my Datatable shows data from table A only, can I specify a search from the JOIN of tables A and B?

    I don't necessarily want that information to display, but I would like to search on it.

    (And hidden fields is probably not the answer. If I do the JOIN for the display, I get repetitive rows, given that there is no GROUP BY in Editor PHP.)

Sign In or Register to comment.