Wiki articles tagged with "CGridView"

Showing 41-60 of 65 items.

Displaying image in a CGridView column.

Created 13 years ago by sirin k sirin k, updated 8 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.

9 1
14 followers
Viewed: 76 493 times
Version: 1.1
Category: How-tos

Dynamic parent and child CGridView on single view. Using $.ajax to update child gridview via controller, after row in parent gridview was clicked.

Created 13 years ago by Gerhard Liebenberg Gerhard Liebenberg, updated 11 years ago by Gerhard Liebenberg Gerhard Liebenberg.

Many desktop programmers are used to having dynamic forms, where clicking on a record in a parent sub-form, updates another sub-form with the child records. While having many levels of nested sub-forms in a single view might not be such a good idea for a web application, I thought doing it one level deep might be interesting and useful. But, instead of sub-forms I used CGridViews.

Searching and Sorting by Count of Related Items in CGridView

Created 13 years ago by softark softark, updated 10 years ago by softark softark.

class Post extends CActiveRecord {

...

} ` When you list Authors in grid you would like to print the count of posts in column, allow sorting on this column and probably filtering by the count.

21 0
40 followers
Viewed: 61 627 times
Version: 1.1
Category: How-tos

Using CJuiDatePicker for CGridView filter

Created 13 years ago by softark softark, updated 11 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz).

We can use a CJuiDatePicker for a CGridView inline filter.

19 0
31 followers
Viewed: 65 562 times
Version: 1.1
Category: How-tos

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: 82 066 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 013 times
Version: 1.1
Category: How-tos

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: 70 952 times
Version: 1.1
Category: Tutorials

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

Searching and sorting by related model in CGridView

Created 13 years ago by Maciej Liżewski Maciej Liżewski, updated 11 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz).

Lets say we have two models and relation between them:

77 0
93 followers
Viewed: 291 908 times
Version: 1.1
Category: Tutorials

CGridView: Render customized/complex datacolumns

Created 13 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: 169 989 times
Version: 1.1
Category: Tips
Tags: CGridView

CGridView: Update/create records in a CJuiDialog

Created 13 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 106 times
Version: 1.1
Category: Tips
14 0
20 followers
Viewed: 78 695 times
Version: 1.1
Category: Tips

Special $variables in CGridView and CListView

Created 13 years ago by Steve Friedl Steve Friedl, updated 13 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: 78 928 times
Version: 1.1
Category: Tips

Creating a jQueryUI Sortable CGridView

Created 13 years ago by blindMoe blindMoe, updated 12 years ago by rAWTAZ rAWTAZ.

I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

36 0
54 followers
Viewed: 54 016 times
Version: 1.1
Category: How-tos

Using filters with CGridView and CArrayDataProvider

Created 13 years ago by marcovtwout marcovtwout, updated 11 years ago by yugene yugene.

Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

19 0
29 followers
Viewed: 95 743 times
Version: 1.1
Category: How-tos

Filter / Search with CListView

Created 13 years ago by JohnPollard JohnPollard, updated 12 years ago by JohnPollard JohnPollard.

This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

22 0
26 followers
Viewed: 56 948 times
Version: 1.1
Category: How-tos

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: 78 722 times
Version: 1.1
Category: Tutorials

How to show ajax delete status in CGridView like flash messages

Created 14 years ago by hasanavi hasanavi, updated 12 years ago by adlersd adlersd.

I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully dele...

17 0
30 followers
Viewed: 58 043 times
Version: 1.1
Category: How-tos

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: 43 272 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: 53 306 times
Version: 1.1
Category: How-tos