Author Topic: Range condition  (Read 2320 times)

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Range condition
« on: January 09, 2019, 06:51:43 pm »
As default all options are selected when using filter condition Range. Is it possible to have none selected as default?
« Last Edit: January 09, 2019, 06:53:14 pm by queensgambit9 »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Range condition
« Reply #1 on: January 10, 2019, 03:27:29 pm »
It can be customized in filter.selectGridCreated callback like this:

Code: [Select]
selectGridCreated: function(ui){
var c = ui.grid.Checkbox(ui.column.dataIndx);
if( c.isHeadChecked() )
c.unCheckAll();
}

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Re: Range condition
« Reply #2 on: January 10, 2019, 04:59:52 pm »
Thanks. Would this be correct implementation?

Code: [Select]
{ title: 'test', filter: { crules: [{ condition: 'range' }],

selectGridCreated: function(ui){
var c = ui.grid.Checkbox(ui.column.dataIndx);
if( c.isHeadChecked() )
c.unCheckAll();
} } }

When opening the dropdown the grid seems to refetch data from db?