Dear All,
Here is a case, I have dropDownList,CJuiAutoComplete and CGridView .
Based on the drop down list , CJuiAutoComplete gets the typed selection from the database and here is the code for it .
<?php echo CHtml::dropDownList('type','',array('Company'=>'Company','Profession'=>'Profession','People'=>'People')); ?>
<?php
$this->widget('zii.widgets.jui.CJuiAutoComplete', array(
'name'=>'test1',
'source'=>'js: function(request, response) {
$.ajax({
url: "'.$this->createUrl('myAutoComplete/autoCompleate').'",
dataType: "json",
data: {
term: request.term,
brand: $("#type").val()
},
success: function (data) {
response(data);
}
})
}',
'options' => array(
'showAnim' => 'fold',
'select' => 'js:function(event, ui){ alert(ui.item.value) }'
),
));
?>
This works perfect . And now I want to pass the dropdown list value ( In the above case Company , profession or People) and the selected value from CJuiAutoComplete to CGridView data provider and display the results in CGridView . Again whenever user changes the value in dropdown list or in CJuiAutoComplete I want to refresh CGridView . Could some one please throw me some light how to implement this
( Code snippet passing dropdown list and CJuiAutoComplete values to CGridView data provider whenever there change )
THANKS A LOT FOR YOUR HELP