更新的数据未发布。我正在使用kartik高级网格和kartik可编辑。
editableAjaxError未返回任何错误。实际列更新但似乎没有提交表单数据(可编辑的弹出数据)
更新:添加了indexAction和两个网格。主网格和扩展网格模板。
的actionIndex
{% extends 'firmy/base.html' %}
{% block kategorie %}
{% for kategoria in kategorie %}
<p>{{ kategoria.glowna }}</p>
{% endfor %}
{% endblock kategorie %}
视图/ index.php的
public function actionIndex()
{
if (Yii::$app->request->isAjax && Yii::$app->request->post('hasEditable')){
// return empty json object for now
echo Json::encode(['output' => '', 'message' => Yii::$app->request->post('hasEditable')]);
return;
}
$searchModel = new \common\models\CustomerMasterSearch();
$queryParams = array_merge(array(),Yii::$app->request->getQueryParams());
if(isset(Yii::$app->request->queryParams['CustomerMasterSearch']))
{
// some code here
}
$dataProvider = $searchModel->search($queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
视图/ _brandbudget.php
echo GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'pjax' => true,
'columns' => [
//['class' => 'yii\grid\SerialColumn'],
[
'class' => 'kartik\grid\ExpandRowColumn',
'value' => function ($model, $key, $index, $column){
return GridView::ROW_COLLAPSED;
},
'detail' => function ($model, $key, $index, $column){
$searchModel = new BrandBudgetSearch();
$searchModel->customerid = $model->customerid;
$queryParams = array_merge(array(),Yii::$app->request->getQueryParams());
$dataProvider = $searchModel->search($queryParams);
return Yii::$app->controller->renderPartial('_brandbudget', [
'dataProvider' => $dataProvider,
]);
}
],