rafs
(Rafal)
1
Hello All,
I have a small problem with use of filter in cgriedview. Sort is working ok but filter not, i got error:
Uncaught TypeError: Cannot read property ‘loadingClass’ of undefined jquery.yiigridview.js:253
(anonymous function) jquery.yiigridview.js:253
jQuery.extend.each jquery.js:660
jQuery.fn.jQuery.each jquery.js:271
methods.update jquery.yiigridview.js:248
$.fn.yiiGridView jquery.yiigridview.js:382
(anonymous function) jquery.yiigridview.js:132
jQuery.event.dispatch jquery.js:3332
elemData.handle.eventHandle
What is it?
mdomba
(Maurizio Domba Cerin)
2
Please post your CGridView code… also if you are not using the last version of Yii try it…
rafs
(Rafal)
3
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'prod',
'dataProvider'=> $prod->search(),
'filter'=> $prod,
'columns'=>array(
)); ?>
in my controller
$prod=new Products('search');
$prod->unsetAttributes(); // clear any default values
if(isset($_GET['Products']))
$prod->attributes=$_GET['Products'];
My problem is, when i use it in another part of my app the filter don’t work
, i can sort but filter is not working. In the
?r=products/admin
part all filters are working excellent.
And i need to have this cgriedview in another part of my app!
mdomba
(Maurizio Domba Cerin)
4
And how do you use it in that "other part"?
rafs
(Rafal)
5
With "other part" i was thinking about
?r=products/admin
, which is the main page for "products" - there all filters, sort etc. are working good.
Now back to the place, where i have to use this "product-CGridView".
I think, main problem is the url - when i want to use it, url looks like:
r=task/myupdate&id=88
and exactly here i need it. I have made just a test, for example i can use my grid without problems in
r=task/myupdate
but, as said in
r=task/myupdate&id=88
it dosen’t work. Why?
venu85
(Venu Narukulla)
6
It was working before for me but with the latest yii version, the ajax request is not submitting ,
progress wheel is rotating indefinitely.
please can some one help?