Hello everyone.
Im doing a CArrayDataProvider manually and adding a filterForm in the easiest way:
$dataProvider = new CArrayDataProvider($arrayTotal, array('keyField'=>'IdSemaforo', 'pagination'=> array('pageSize'=>'15')));
$filtersForm=new FiltersForm;
if (isset($_GET['FiltersForm']))
$filtersForm->filters=$_GET['FiltersForm'];
$filteredData = $filtersForm->filter($dataProvider);
$this->render('admin', array( 'model'=>$dataProvider,
'filter'=>$filtersForm));
This works perfectly and filters the way i want.
The problem is that the filters dont filter the exact value, it does some kind of "like"…
Since im creating a CArrayDataProvider, i cant create a criteria. I have no clue how to do this.
There is a screenshot to show what i want. As you see i put systemCode=‘25’ and it shows me all '25’s and '25x’s… i want the 25s only
Appreciate any tips. Thank you