I'm trying to refresh the grid, but i get this error:
TypeError: $.fn.GridView is undefined
This is my js code:
$( document ).ready(function() {
$("#username_filter").keyup(function( event ) {
if ($(this).val().length >3){
$.ajax({
url: "/common/main/filterData/",
type: "POST",
data: { username : $(this).val() },
}).done(function() {
$.fn.GridView.update("#yw0");
});
}
});
});
and this is the view:
.....
$this->widget('GridView', array(
'dataProvider' => $data,
//'filter' => '',
'itemsCssClass'=>'table',
'pager' => array(
'class' => 'CLinkPager',
'prevPageLabel' => 'Previous',
'nextPageLabel' => 'Next',
'header' => '',
'previousPageCssClass' => 'btn btn-info btn-sm',
'selectedPageCssClass' => 'btn btn-warning btn-sm',
'internalPageCssClass' => 'btn btn-info btn-sm',
'firstPageCssClass' => 'btn btn-info btn-sm',
'nextPageCssClass' => 'btn btn-info btn-sm',
),
....
Maybe it is a noob question, but where is generated the id of the grid ?