Real Time Search With Ajax In Gridview

I’m trying to add a real time search to my GridViews but I can’t find any working tutorial.

By real time search I mean: Image we have two users called Alex and Yii. If I want to search for one of them I have to type the whole name or part of it, but as soon as I type the first letter, I want it to show me only the names that start with an A.



You can use this following widget … to accomplish your requirment

$this->widget('zii.widgets.jui.CJuiAutoComplete', array(

    'model' =>$this->module->getUserModel(),


    'sourceUrl' => Yii::app()->urlManager->createUrl($parent."srbac/authitem/getUsers") ,

    // additional javascript options for the autocomplete plugin

    'options' => array(

        'minLength' => '2',



            url: "'.$url.'",

              data : "id=",

            success: function(html){






    'htmlOptions' => array(

        'style' => 'height:20px;'