Wiki articles tagged with "CGridView"

Showing 1-20 of 65 items.

Using standard filters in CGridView custom fields

Created 15 years ago by GOsha GOsha, updated 15 years ago by jwerner jwerner.

In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.
For example:
We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0.
So we do the usual thing:

<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
    'name'=>'...
14 0
16 followers
Viewed: 76 739 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

Created 14 years ago by PinkBrainPlan PinkBrainPlan, updated 14 years ago by PinkBrainPlan PinkBrainPlan.

<?php $this->widget('zii.widgets.grid.CGridView', array(

'dataProvider' => $dataprovider,
'id'=>'recipient_table',
    'selectionChanged'=>'updateEditForm',
'columns' => array(
	'rec_id',
            'org.nachname',
            'org.vorname',
            'org_id',
            array(
                'class'=>'CButtonColumn',
                'template'=>'{...
1 0
10 followers
Viewed: 29 658 times
Version: 1.1
Category: How-tos

Keeping a running total in a CGridView

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

This tip created in conjunction with IRC #yii channel users emilsedgh and tydeas - thanks!

22 0
19 followers
Viewed: 82 449 times
Version: 1.1
Category: How-tos
Tags: CGridView

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 518 times
Version: 1.1
Category: Tips

Search method of a model for filters when using dates - unixtimestamp in database

Created 14 years ago by Mukke Mukke, updated 14 years ago by jwerner jwerner.

I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

10 0
11 followers
Viewed: 39 867 times
Version: 1.1
Category: Tips

Update/delete model with CJuiDialog (works in CGridView)

Created 14 years ago by ifdattic ifdattic, updated 14 years ago by ifdattic ifdattic.

This tutorial will show you how to create Ajax dialog which allows to create new model, update or delete existing model. It works with simple links, CGridView button column links, adds a minimal amount of code and degrades gracefully with JavaScript turned off.

15 0
25 followers
Viewed: 79 814 times
Version: 1.1
Category: Tutorials

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 954 times
Version: 1.1
Category: Tips

Exporting CGridView results to CSV file

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

A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.

6 3
18 followers
Viewed: 71 730 times
Version: 1.1
Category: Tutorials

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 13 years ago by c@cba c@cba, updated 13 years ago by c@cba c@cba.

    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this:
'value'=>'$data->author->username',.
    Now we might want to use $data in the declaration of the `...

19 1
14 followers
Viewed: 83 008 times
Version: 1.1
Category: Tutorials

CGridView keep focus on the control after filtering

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

You can find the reason why I wrote this article here.

5 0
10 followers
Viewed: 18 744 times
Version: 1.1
Category: How-tos

Change buttons on our CGridView extending yii

Created 14 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 670 times
Version: 1.1
Category: Tips

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: 60 095 times
Version: 1.1
Category: Tips
14 0
20 followers
Viewed: 79 809 times
Version: 1.1
Category: Tips

Avoiding rendering entire page when using CGridView and CListView via AJAX

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

Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

23 0
29 followers
Viewed: 54 630 times
Version: 1.1
Category: How-tos

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 829 times
Version: 1.1
Category: Tips

Working with CGridView in Admin Panel

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

This is a tutorial for how to add input text-Field, check-box, buttons in CGridView.

21 1
41 followers
Viewed: 93 615 times
Version: 1.1
Category: Tutorials

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 956 times
Version: 1.1
Category: Tips

CButtonColumn: Use special variable $data for the 'id' in the 'options' of a button

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

Inspired by it I extended the CButtonColumn class like this:

5 0
7 followers
Viewed: 45 669 times
Version: 1.1
Category: Tutorials

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

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

This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

Intro

17 0
41 followers
Viewed: 77 735 times
Version: 1.1
Category: Tutorials

Create custom button button with AJAX function in CGridView

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

This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.

5 0
15 followers
Viewed: 69 723 times
Version: 1.1
Category: How-tos