<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' =>'id_product_attribute',
'label' => 'Attribute Value-Pair',
'value'=>ProductAttributeController::attributepair(),
],
'price',
'weight',
],
]); ?>
public function attributepair(){
$id = $_GET['id'];
$attribute_pair = $this->context->actionAttributecombination($id);
$attribute_pair = rtrim($attribute_pair, ",");
return $attribute_pair;
}
$ attribute_pair返回字符串&#34;大小:黄色,长度:30&#34;。如何在gridview中显示此数据?
答案 0 :(得分:0)
您的功能必须Sub AddRow()
Dim LR As Long
LR = Range("A" & Rows, Count).End(xlUp).Row
Rows(LR).Copy
Rows(LR + 1).Insert
End Sub
,因为您使用的是static
::