Skip to content

Magento 2 I tried to retrieve the custom column field value in the product grid using a renderer data is not psot edit time

$this->addColumn(
        'customer_price',
        [
            'header' => __('Customer Price'),
            'type' => 'number',
            'currency_code' => $store->getBaseCurrency()->getCode(),
            //'value'=> 10,
            'index' => 'customer_price',
            'header_css_class' => 'col-customer-price',
            'column_css_class' => 'col-customer-price',
            'editable' => true,
            'edit_only' => true,
            'filter' => false,
            'renderer' => 'BlissPricePerCustomerBlockAdminhtmlCatalogProductGridColumnRendererCustomerPriceRenderer'
        ]
    );


    $this->addColumn(
        'customer_special_price',
        [
            'header' => __('Customer Special Price'),
            'type' => 'number',
            'currency_code' => $store->getBaseCurrency()->getCode(),
            //'values'=> $this->getCustomerSpecialPrice(),
            'index' => 'customer_special_price',
            'header_css_class' => 'col-customer-special-price',
            'column_css_class' => 'col-customer-special-price',
            'editable' => true,
            'edit_only' => true,
            'filter' => false,
            'renderer' => 'BlissPricePerCustomerBlockAdminhtmlCatalogProductGridColumnRendererCustomerSpecialPriceRenderer'
        ]
    );