Primary Names begins with Lowercase letter
Primary Names begins with Lowercase letter
I have an instance of a dataTable where the primary column displays individual last names. Some names begin with a lowercase letter (i.e., deCordova). For the full list the names display as they should but if the 'D' Alpha letter is selected to filter the name those with 'deCordova' do not appear.
What can I do to ensure the 'deCordova' records appear when the Alpha letter 'D' is selected? Is this not doable?
James A Wilson
https://www.txgrayson.org/memorials/005/allison-cemetery
Answers
That's a really old version of DataTables and the alphabet search plugin you've got there. The error you are seeing has been corrected in the latest versions, so you could update to recitfy the problem.
Alternatively, if you want a quick patch, in your file https://www.txgrayson.org/java/functions_java/_alphabet_Search.js find:
and change to be:
I think that should fix it.
Allan
Thanks much... that did solve the problem.
I probably should update to the latest DataTables. But with almost 300 uses across 6 website it might be a very daunting task.
Can you give me a clue as to how much effort an upgrade might take? Is it just a matter of a link to the latest version or will something be necessary on each instance.
Thanks for a great product. As stated above I use it across almost every page on my websites.
James A Wilson
msholmes.org, txfannin.org, txgrayson.org
Here is the Upgrade guide. A few options, like
deferRender
, have changed defaults to look out for. Also refer to this post for more DT 2.0 info. As always it is best to use a test environment when doing a major version upgradeKevin
Kevin, I looked at the Upgrade Guide. I think the major problem with an upgrade is changing ~300 instances of DataTables using the DOM options to Layout options.
Some questions about the Layout format.
How is the Alpha Letter array indicated in the Layout?
Given that some of the tables might have fewer rows than the PageLength min number, I have a routine that checks the number of rows against the PageLength value and if less, hides the items div.top and div.bottom areas. A routine on some pages also checks the PageLength to hide the Alpha letters. These functions are called in initComplete and drawCallback. I assume these could be updated for the layout options formatting.
The Layout format seems to only allow for a single element or two with start and end elements. What about a layout with three elements? Yes, for larger viewports I do have a few the pageLength paging search. I assume these could be formatted using the single and double method by stacking. Which bring up another issue... could the three be stacked as double and single?
If you look through one of my sites (msholmes.org, txfannin.org, txgrayson.org) you will notice that most of the pages use a DataTable. What you don't see is the admin area that uses a DataTable to assist volunteers in updating the 60+ mySql tables in the database.
James A Wilson
p.s., Don't let my photo fool you. It was taken in 1964.
It isn't - it is replaced with something more understandable. For example
B
isbuttons
inlayout
.Most likely it will just need a class name to be updated - e.g.
div.dt-length
for the page length element now.I'm working on a solution for that for DataTables 2.1. It will be an array of elements for the
top
orbottom
(i.e. I won't be introducingtopCenter
).Yes, that is one of the benefits of the new layout - customisation like that is easier.
It should be noted that
dom
isn't going away anytime soon. I have no immediate or medium term plans for DataTables 3 yet. It will continue to be fully supported in all 2.x releases.Allan