Wiki

Sorted by ratingX
Displaying 131-140 of 732 result(s).

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

Created 2 years ago by Gerhard LiebenbergTutorials20 comments – viewed 69,800 times – ( +26 / -1 ) – version 1.1
This wiki is a step-by-step example explaining how the controller, model and the view's CGridView work together. It explains simple things - as well as more complex things that you will anyway quickly have to know. So, even if you don't use dynamic gridviews, take a morning off and thoroughly work through this tutorial. It should save you lots of struggling.

Using standard filters in CGridView custom fields

Created 4 years ago by GOshaHow-tos4 comments – viewed 52,937 times – ( +17 ) – version 1.1
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:

htmlOptions explained for various controls.

Created 4 years ago by WoilTips1 comment – viewed 45,142 times – ( +17 ) – version 1.1
Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

CListView AJAX filtering

Created 3 years ago by DragaTutorials17 comments – viewed 51,039 times – ( +17 ) – version 1.1
This tutorial shows how to filter CListView items by AJAX, and it's compatible with disabled JavaScript users In my case this has been done to filter users list

Understanding series articles

Created 3 years ago by GOshaTips0 comments – viewed 8,251 times – ( +16 ) – version 1.1
Here are all wiki articles from "Understanding" series by Yii wiki contributors:

Simple authorization system

Created 3 years ago by GustavoHow-tos1 comment – viewed 25,644 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

1:n relations sometimes require CDbCriteria.together

Created 3 years ago by fsbTips5 comments – viewed 28,536 times – ( +16 ) – version 1.1
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

Manage application configuration in different modes

Created 5 years ago by qiangTutorials5 comments – viewed 31,933 times – ( +16 ) – version 1.1
Info: This tutorial references the idea presented in Jonah's excellent blog article.

Getting the Most out of APC for Yii

Created 2 years ago by Da:SourcererHow-tos10 comments – viewed 29,214 times – ( +16 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Create custom button button with AJAX function in CGridView

Created 2 years ago by nkdHow-tos1 comment – viewed 38,888 times – ( +16 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.