Wiki

Articles in category "tips", sorted by ratingX
Displaying 21-30 of 97 result(s).

Getting nulls from database instead of empty strings

Created 2 years ago by samdarkTips2 comments – viewed 6,638 times – ( +12 )
To get null from database instead of empty strings you need to set up your DB connection as follows:
tags: database, null

Special $variables in CGridView and CListView

Created about a year ago by Steve FriedlTips8 comments – viewed 21,750 times – ( +18 / -1 )
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.

CGridView: Update/create records in a CJuiDialog

Created about a year ago by JobloTips10 comments – viewed 20,977 times – ( +11 )
My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

How to filter CGridView with From Date and To Date datepicker

Created 10 months ago by kiran sharmaTips10 comments – viewed 13,453 times – ( +11 )
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.

Display a nice exception message on ajax requests

Created about a year ago by Maurizio DombaTips1 comment – viewed 15,090 times – ( +11 )
When an exception is thrown in our code like
tags: error, exception

Styling Radio Buttons

Created 2 years ago by Steve FriedlTips2 comments – viewed 21,741 times – ( +10 )
The default behavior with radio button lists is ugly, and I figured out mostly how to style them a coupla different ways. I'll used the blog tutorial example (but with my own posting modes):

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

Created 2 years ago by MukkeTips1 comment – viewed 14,993 times – ( +10 )
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.

Avoiding duplicate script download when using Ajax calls to render different Views

Created about a year ago by Antonio RamirezTips4 comments – viewed 10,834 times – ( +10 )
I had to partially render two types of views, depending on user selection. Wanted to display a GRID or a LIST style with an event that AJAX'ed new contents and update a layer with them.
tags: tutorial, AJAX, views

Ajax update

Created 2 years ago by zaccariaTips1 comment – viewed 32,910 times – ( +20 / -2 )
Often happens to have the need of change a part of the page with ajax.
tags: AJAX

Directory independent extensions

Created 2 years ago by GOshaTips3 comments – viewed 6,030 times – ( +15 / -1 )
Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases: