1

I want to display the product name in custom tab form on admin grid and
you can see the form image I have added below. enter image description here

  • Please explain a bit more in your question. – Mohit Kumar Arora Mar 4 at 5:58
  • in custom tab form that you can see in the image there i want to display the particular product name in the form – Ashish Ramchandani Mar 4 at 6:00
0
$fieldset->addField(
    'field_name',
    'label',
    [
        'name' => 'field_name',
        'label' => __('Productname'),
        'title' => __('Product Name'),
        'renderer'  => 'VendorName\ModuleName\Block\Adminhtml\Extension\Grid\Renderer\Productname',
    ]
);

Define Render :-

<?php

namespace VendorName\ModuleName\Block\Adminhtml\Extension\Grid\Renderer;

class Produtcname extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer {



    public function __construct(
        \Magento\Backend\Block\Context $context,

        array $data = []) {
        parent::__construct($context, $data);

        $this->_authorization = $context->getAuthorization();
    }
    public function render(\Magento\Framework\DataObject $row) {
        //write your code
    }

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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