如何删除总结类在yii2中? [英] How to remove summary class In yii2?

查看:138
本文介绍了如何删除总结类在yii2中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想从我的页面中删除显示在附加屏幕截图中的那一行。我可以如何编辑这个从我的yii2项目

解决方案

最好的方法是覆盖 gridView 小部件。默认情况下,小部件将根据此模式生成布局; {摘要} \\\
{物品} \\\
{寻呼机}
。您可以像这样控制小部件中出现的内容;

$ echo $ Grid $ :: widget([
'dataProvider' => $ dataProvider,
'filterModel'=> $ searchModel,
'layout'=>'{items} \\\
{pager}',
'columns'=> ; [
// ...
],
]);


I want to remove the line which is show in attached screen shot from my page.How can I edit this from my yii2 project

解决方案

The best way to do this is to override the layout of the gridView widget. By default, the widget will generate a layout based on this pattern; {summary}\n{items}\n{pager}. You can control over what appears in the widget like this;

echo GridView::widget([
   'dataProvider' => $dataProvider,
   'filterModel' => $searchModel,
   'layout' => '{items}\n{pager}',
   'columns' => [
    // ...
      ],
]);

这篇关于如何删除总结类在yii2中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆