I added a column to the admin grid, to filter on a custom attribute. But this filter does not work properly.
When I filter on value "50" it also display all values with "150". How can I change that?
I use this admin grid code:
$this->addColumn('type_staffel', array(
'header' => $helper->__('type_staffel'),
'width' => 100,
'index' => 'type_staffel',
));
asked Nov 24, 2015 at 13:03
-
is type_staffel number?Abdul– Abdul2015年11月24日 13:05:19 +00:00Commented Nov 24, 2015 at 13:05
-
@Abdul What do you mean with is number?JGeer– JGeer2015年11月24日 13:06:47 +00:00Commented Nov 24, 2015 at 13:06
-
add 'type' => 'number' to filter with range valueMinesh Patel– Minesh Patel2015年11月24日 13:09:44 +00:00Commented Nov 24, 2015 at 13:09
1 Answer 1
define your column like this:
$this->addColumn('type_staffel', array(
'header' => $helper->__('type_staffel'),
'width' => 100,
'index' => 'type_staffel',
'type' => 'number'
));
answered Nov 24, 2015 at 13:05
default