EasyUI Forum
April 27, 2024, 08:20:20 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to set defaultFilterOptions in datagrid-filter?  (Read 3795 times)
officecode
Jr. Member
**
Posts: 69


View Profile Email
« on: January 15, 2019, 09:48:04 PM »

Since the defaultFilterType defaults to text, why is the following code invalid and error?

Code:

$('#dg').datagrid({
url:...,
        columns:...,
pagination:true,
defaultFilterOptions:{
placeholder:'enter filter text here...'
}
}).datagrid('enableFilter')

Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: January 16, 2019, 06:00:33 AM »

Please try this code.
Code:
var dg = $('#dg').datagrid({
    defaultFilterType: 'textbox',
    defaultFilterOptions: $.extend({}, $.fn.datagrid.defaults.defaultFilterOptions, {
        prompt: 'enter filter text here...'
    })
});
Logged
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« Reply #2 on: January 30, 2020, 03:35:18 AM »

Sorry to take up an old issue, but
defaultFilterOptions to set a filter promt, as suggested by Jarry in the previous post, doesn't seem to work:

http://code.reloado.com/isuzex3/6/edit#preview

Would be great if someone at EasyUI support could check this one out.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: January 30, 2020, 04:13:40 AM »

This example works fine.
http://code.reloado.com/isuzex3/7/edit#preview
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!