Wiki articles in category Tips tagged with "CGridView"

Showing 1-20 of 21 items.

Search scenario (CGridView, etc.): avoid default values from database as search condition.

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top.

Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.

1 0
2 followers
Viewed: 12 182 times
Version: 1.1
Category: Tips

View a related field in CGridView

Created 11 years ago by rafaelt88 rafaelt88, updated 10 years ago by rafaelt88 rafaelt88.

Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

2 0
3 followers
Viewed: 20 403 times
Version: 1.1
Category: Tips

CGridView customized CCheckBoxColumn

Created 11 years ago by chandran chandran, updated 11 years ago by CeBe CeBe.

Hi friends,

3 0
6 followers
Viewed: 21 783 times
Version: 1.1
Category: Tips

Multi Data Provider

Created 12 years ago by Sharon Lavie Sharon Lavie, updated 9 years ago by Sharon Lavie Sharon Lavie.

Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).

1 0
4 followers
Viewed: 20 385 times
Version: 1.1
Category: Tips
1 0
6 followers
Viewed: 66 839 times
Version: 1.1
Category: Tips

How to Display tooltp(qtip) on CGridview dynamic

Created 12 years ago by Ankit Modi Ankit Modi, updated 12 years ago by softark softark.

Hi Friends,

0 0
4 followers
Viewed: 18 349 times
Version: Unknown (update)
Category: Tips

Search a file size range in CGridView

Created 12 years ago by CrazyCat CrazyCat, updated 12 years ago by CrazyCat CrazyCat.
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
2 0
2 followers
Viewed: 13 114 times
Version: Unknown (update)
Category: Tips

CGridView: Adding behaviors from configuration, and template items from behaviors to CGridView

Created 12 years ago by le_top le_top, updated 12 years ago by le_top le_top.

Changing the way a CGridView is rendered from the configuration file, or through behaviors specified at the moment it is used, is handy to extend a CGridView without creating tons of different classes for it. I am surprised that this is not in the default implementation, so I made my default CGridView implementation.

3 0
3 followers
Viewed: 16 622 times
Version: 1.1
Category: Tips

Adding a date range search for CGridView the easy way

Created 12 years ago by mikewalen mikewalen, updated 12 years ago by mikewalen mikewalen.
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
  3. Modify the _search form view to add the date range inputs
6 0
11 followers
Viewed: 44 387 times
Version: 1.1
Category: Tips

Adding a link to a CDataColumn

Created 12 years ago by le_top le_top, updated 12 years ago by le_top le_top.

Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

2 0
8 followers
Viewed: 28 639 times
Version: 1.1
Category: Tips

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 13 years ago by Xgamer99 Xgamer99, updated 13 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it o...

1 0
7 followers
Viewed: 23 148 times
Version: 1.1
Category: Tips

Customize CGridView columns directly in your view

Created 13 years ago by clapas clapas, updated 13 years ago by clapas clapas.

You usually take a model instance passed into your view to provide data to a CGridView in this way:

2 1
5 followers
Viewed: 40 768 times
Version: 1.1
Category: Tips

BootProgressColumn - Progress Bar Inside GridView Column compatible with 'bootstrap' extension

Created 13 years ago by Luiz Luiz, updated 12 years ago by robregonm robregonm.

A little hint of how to create a progress bar inside the column of the grid, using the 'bootstrap' extension.

5 0
7 followers
Viewed: 26 594 times
Version: 1.1
Category: Tips

How to filter CGridView with From Date and To Date datepicker

Created 13 years ago by kiran sharma kiran sharma, updated 13 years ago by kiran sharma kiran sharma.

This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use Yii Cookie to preserve date in datepicker textbox after submitting the form.

9 0
26 followers
Viewed: 65 602 times
Version: 1.1
Category: Tips

Change buttons on our CGridView extending yii

Created 13 years ago by sensorario sensorario, updated 13 years ago by sensorario sensorario.

In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

9 0
9 followers
Viewed: 37 495 times
Version: 1.1
Category: Tips

CGridView: Render customized/complex datacolumns

Created 14 years ago by Joblo Joblo, updated 12 years ago by Joblo Joblo.

If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.

53 0
74 followers
Viewed: 170 777 times
Version: 1.1
Category: Tips
Tags: CGridView

CGridView: Update/create records in a CJuiDialog

Created 14 years ago by Joblo Joblo, updated 13 years ago by Joblo Joblo.

My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

12 0
26 followers
Viewed: 59 830 times
Version: 1.1
Category: Tips
14 0
20 followers
Viewed: 79 543 times
Version: 1.1
Category: Tips

Special $variables in CGridView and CListView

Created 14 years ago by Steve Friedl Steve Friedl, updated 14 years ago by Steve Friedl Steve Friedl.

The popular [CListView] and [CGridView] widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

23 1
33 followers
Viewed: 79 664 times
Version: 1.1
Category: Tips

Using CJuiDialog to edit rows in a CGridView

Created 14 years ago by Russell England Russell England, updated 14 years ago by Russell England Russell England.

I used Zaccarias excellent article as the base http://www.yiiframework.com/wiki/145/cjuidialog-for-create-new-model/

Solution

First follow the wiki above to create all the required code. Then make the following modifications in your...

3 1
11 followers
Viewed: 44 233 times
Version: 1.1
Category: Tips