简体   繁体   English

数据表列下拉排序

[英]datatable column dropdown sorting

I am using datatable in php. 我在php中使用数据表。 I am able to sort the value inside the data table. 我能够对数据表中的值进行排序。 But not able to sort the value in drop down. 但是无法对下拉列表中的值进行排序。 It is not displayed in random manner enter image description here 它不会以随机方式显示在此处输入图像描述

That dropdown is your Datatable filter. 该下拉列表是您的数据表过滤器。 You can sort values for a particular column but you can not sort values shown in your form element. 您可以对特定列的值进行排序,但不能对表单元素中显示的值进行排序。 Try sorting these values before you are looping in your dropdown. 在循环下拉列表之前,请尝试对这些值进行排序。 For this type of filter, I prefer using bootstrap datepicker 对于这种类型的过滤器,我更喜欢使用引导日期选择器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM