Easyui of Datagrid-filter data grid filter in Chinese

Source: Internet
Author: User

Recently in the study Easyui, wrote some interface;

In the grid table Datagrid-filter encountered a data filtering operation, a lot of customers are bad English, how to do it. This requires the programmer to be Chinese.

First, let's take a look at what the source code under Easyui is like. As shown below,


In fact, the Han is very simple, the great god please sneak through it, rookie can see.

1, this grid of the DataGrid is required datagrid-filter.js, this JS can be downloaded on the Easyui official website.

2, only need to add the following code inside the Locale/easyui-lang-zh_cn.js.


if ($.fn.datagrid && $.fn.datagrid.defaults && $.fn.datagrid.defaults.operators.nofilter) {
$.fn.datagrid.defaults.operators.nofilter.text = "None";
$.fn.datagrid.defaults.operators.contains.text = "contains";
$.fn.datagrid.defaults.operators.equal.text = "= equals";
$.fn.datagrid.defaults.operators.notequal.text = "! =" is not equal to ";
$.fn.datagrid.defaults.operators.beginwith.text = "^= begins with *";
$.fn.datagrid.defaults.operators.endwith.text = "$= ends with *";
$.fn.datagrid.defaults.operators.less.text = "< less";
$.fn.datagrid.defaults.operators.lessorequal.text = "<= less than equals";
$.fn.datagrid.defaults.operators.greater.text = "> Greater than";
$.fn.datagrid.defaults.operators.greaterorequal.text = ">= greater than equals";
}


It is important to note that if you add this line of code and the Chinese is invalid. Just check to see if Easyui-lang-zh_cn.js was called after Datagrid-filter.js.

As follows:


The final result: the following


Thank you for your support.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.