1

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',
    ));
3
  • is type_staffel number?
    – Abdul
    Nov 24, 2015 at 13:05
  • @Abdul What do you mean with is number?
    – JGeer
    Nov 24, 2015 at 13:06
  • add 'type' => 'number' to filter with range value Nov 24, 2015 at 13:09

1 Answer 1

3

define your column like this:

$this->addColumn('type_staffel', array(
    'header' => $helper->__('type_staffel'),
    'width'  => 100,
    'index'  => 'type_staffel',
    'type'   => 'number'
));
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.