简体   繁体   English

如何在magento admin的自定义网格中为文本框设置值?

[英]How to set value to textbox in custom grid in magento admin?

I add a custom textbox in a column. 我在列中添加了一个自定义文本框。 but i am not able to fetch its value. 但我无法获取其价值。 在这里我附上我所做的

I did some this type of coding to show textbox. 我做了一些这种类型的编码来显示文本框。 But the problem is how can i set value for textbox. 但是问题是我如何设置文本框的值。

    $html = '<input type="text" ';
    $html .= 'name="' . $this->getColumn()->getId() . '" ';
    $html .= 'id="' . $this->getColumn()->getId() . '" ';
    $html .= 'value=""';
    $html .= 'class="input-text ' . $this->getColumn()->getInlineCss() . '"/>';

Hello check below code may be help you 你好检查下面的代码可能会帮助你

$this->addColumn("sort_order", array(
                "header" => Mage::helper("yourmodulename")->__("Sort Order"),
                "align" =>"left",
                "index" => "sort_order",
                "type"      => "input",
                ));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM