Author Topic: Force equal filter to textbox only  (Read 1824 times)

sachinkumarB.patel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Force equal filter to textbox only
« on: August 14, 2020, 02:29:47 pm »
hi i am evaluation user , i want to text box only in equal filter instead on checkbox selection while selecting equal filter

i am trying to put in colModel like

filter: {
                    type: 'textbox',
                    condition: 'equal',
                    value: ''
                },
but nothing changes happen

please help us ASAP

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Force equal filter to textbox only
« Reply #1 on: August 19, 2020, 12:25:18 pm »
Checking a checkbox is easier than typing true/false in a textbox.

However if you need a textbox instead of checkbox for "equal" condition in boolean data type columns, use filterFn in the column definition.

Code: [Select]
filterFn: function(ui){                   
                    if(ui.condition == 'equal' ){               
                        return {
attr:'placeholder="Enter true or false"',
type:'textbox'
                        }
                    }
                }