DataGrid/MediaDataGrid.php
public function configureColumns(ColumnCollection $collection)
    {
        $collection->add(new Column([
            'id'         => 'id',
            'caption'    => $this->trans('common.label.id'),
            'sorting'    => new Sorting([
                'default_order' => Sorting::SORT_DIR_DESC,
            ]),
            'appearance' => new Appearance([
                'visible' => false,
            ]),
            'filter'     => new Filter([
                'type' => Filter ::FILTER_BETWEEN,
            ]),
        ]));
        
        $collection->add(new Column([
            'id'         => 'preview',
            'caption'    => $this->trans('common.label.preview'),
            'appearance' => new Appearance([
                'width' => 30,
                'align' => Appearance::ALIGN_CENTER,
            ]),
        ]));
        
        $collection->add(new Column([
            'id'      => 'name',
            'caption' => $this->trans('common.label.name'),
        ]));
        
        $collection->add(new Column([
            'id'      => 'mime',
            'caption' => $this->trans('common.label.mime'),
        ]));
        
        $collection->add(new Column([
            'id'      => 'extension',
            'caption' => $this->trans('common.label.extension'),
        ]));
        
        $collection->add(new Column([
            'id'      => 'size',
            'caption' => $this->trans('common.label.size'),
        ]));
    }
public function configureColumns(ColumnCollection $collection)
    {
        $collection->add(new Column([
            'id'         => 'id',
            'caption'    => $this->trans('common.label.id'),
            'sorting'    => new Sorting([
                'default_order' => Sorting::SORT_DIR_DESC,
            ]),
            'appearance' => new Appearance([
                'visible' => false,
            ]),
            'filter'     => new Filter([
                'type' => Filter ::FILTER_BETWEEN,
            ]),
        ]));
        
        $collection->add(new Column([
            'id'         => 'preview',
            'caption'    => $this->trans('common.label.preview'),
            'appearance' => new Appearance([
                'width' => 30,
                'align' => Appearance::ALIGN_CENTER,
            ]),
        ]));
        
        $collection->add(new Column([
            'id'      => 'name',
            'caption' => $this->trans('common.label.name'),
        ]));
        
        $collection->add(new Column([
            'id'      => 'mime',
            'caption' => $this->trans('common.label.mime'),
        ]));
        
        $collection->add(new Column([
            'id'      => 'extension',
            'caption' => $this->trans('common.label.extension'),
        ]));
        
        $collection->add(new Column([
            'id'      => 'size',
            'caption' => $this->trans('common.label.size'),
        ]));
    }
{@inheritdoc}