I contacted you a while back to look for a solution to sorting a column of IPv4 addresses. You really didn't have a solution. So today i'm working with a column of IPv4 and it dawned on me a potential solution.
When these are sorted, they end up like the screenshot attached. Obviously the order is wrong. .195 and .62 should be after .8. The way i've dealt with this since learning from you that there is no way to sort it right, is to add leading 0s.
So using these zeros solves the problem and the column sorts properly, no matter how different the IPv4 addresses are.
Today i found a IP column in one of my datatables that out of habit i failed to remember to add the leading zeros. So i'm sitting here adding zeros and then it dawned on me,
If we could check a box (like in my "Zero Padding" attachment), to declare that the contents of this column are IPv4 address, then have WPDataTables automatically detect each 3 digit ipv4 octet and add zeros to octets with 1 or 2 digits.
I don't know if an additional option to show/hide the added zeros in the column would be useful or not.
This feature would be very useful to me. I manage a network and keep a lot of technical and network information in WPDataTables.
I contacted you a while back to look for a solution to sorting a column of IPv4 addresses. You really didn't have a solution. So today i'm working with a column of IPv4 and it dawned on me a potential solution.
So the problem stems from a column of IPs i.e.
10.250.10.195
10.250.10.25
10.250.10.3
10.250.10.62
10.250.10.8
10.250.11.4
When these are sorted, they end up like the screenshot attached. Obviously the order is wrong. .195 and .62 should be after .8. The way i've dealt with this since learning from you that there is no way to sort it right, is to add leading 0s.
010.250.010.195
010.250.010.025
010.250.010.003
010.250.010.062
010.250.010.008
010.250.010.004
So using these zeros solves the problem and the column sorts properly, no matter how different the IPv4 addresses are.
Today i found a IP column in one of my datatables that out of habit i failed to remember to add the leading zeros. So i'm sitting here adding zeros and then it dawned on me,
If we could check a box (like in my "Zero Padding" attachment), to declare that the contents of this column are IPv4 address, then have WPDataTables automatically detect each 3 digit ipv4 octet and add zeros to octets with 1 or 2 digits.
I don't know if an additional option to show/hide the added zeros in the column would be useful or not.
This feature would be very useful to me. I manage a network and keep a lot of technical and network information in WPDataTables.
Scott
Attached files: Screenshot 2024-11-21 111423.png
Zero Padding.jpg