Questions tagged [cgridview]

CGridView displays a list of data items in terms of a table.

CGridView displays a list of data items in terms of a table. It is part of framework.

Each row of the table represents the data of a single data item, and a column usually represents an attribute of the item (some columns may correspond to complex expression of attributes or static text).

CGridView supports both sorting and pagination of the data items. The sorting and pagination can be done in AJAX mode or normal page request. A benefit of using CGridView is that when the user browser disables JavaScript, the sorting and pagination automatically degenerate to normal page requests and are still functioning as expected.

Official Yii api of CGridView

381 questions
30
votes
5 answers

Customise grid view in yii2

How to remove summary and sorter for a particular grid view in Yii2. In Yii1.1 we can do that by setting the template property. In yii2 how to achieve this?
Dency G B
  • 7,856
  • 9
  • 42
  • 74
12
votes
1 answer

How to edit the header in a yiibooster gridview?

I started using yiibooster for in-place editing on a gridview simple add $columns[] = array( 'name' => $field->name, 'value' => array($this, 'cellValue'), 'class' => 'bootstrap.widgets.TbJEditableColumn', …
axon
  • 3,271
  • 1
  • 10
  • 12
11
votes
3 answers

How to disable cgridview view button or setting visiability to false

can some buddy please suggest how to disable view button on cgridview widget and how to add more button like active.. $this->widget('zii.widgets.grid.CGridView',…
Coder
  • 153
  • 1
  • 2
  • 10
10
votes
4 answers

CGridview conditional delete button

I want the delete button to be active only in certain condition in CGgridView CButtonColumn (or make a custom delete button) e g if user=='admin' or status=='draft'. Any ideas? Thanks!
zuups
  • 1,130
  • 1
  • 11
  • 17
8
votes
1 answer

MySql Pivot table in to Yii CActiveDataProvider

I have a table structure as following: CREATE TABLE IF NOT EXISTS `CustomValue` ( `id` int(11) NOT NULL, `customFieldId` int(11) NOT NULL, `relatedId` int(11) NOT NULL, `fieldValue` text COLLATE utf8_unicode_ci, `createdAt` timestamp NOT…
dev1234
  • 4,336
  • 13
  • 50
  • 106
6
votes
2 answers

jQuery(...).yiiGridView is not a function

I have a problem with Yii grid view. for some reason it does not seem to load correctly, even though the script is included (i can see it in the source code). This is the header part of the HTML: