Cgridview Pagination Generate Wrong Url

Hello everyone,

I tried to use yii default CGridView widget with pagination.( unfortunately without any success).

In view file the CGridView displaying data but when i clicking on pagination link i got the following error in a

alert dialog: "Error 404: Unable to resolve the request "ProcessInvite"."

(controller’s name missing from generated url );

current url is: "/mk/yiicore/index.php?r=ProcessInvite&userid=169"

should be: "/mk/yiicore/index.php?r=invite/ProcessInvite&userid=169"

VIEW FILE





<form method="POST" action="<?php Yii::app()->request->baseUrl;?>index.php?r=invite/processinvite" class="form-horizontal">

.....

...

    </form>

<?php

$this->widget('zii.widgets.grid.CGridView', array(

    'dataProvider'=>$model,

    'enablePagination' => true,

    'columns'=>array

    (

          array(


               'name' => 'name',

               'type'=>'raw',

               'value' =>'$data->time',

               'header' => 'Time'

           ),          

          array(


               'name' => 'name',

               'type'=>'raw',

               'value' =>'$data->invitedUser->email',

               'header' => 'Email'

           ),          

          array(


               'name' => 'name',

               'type'=>'raw',

               'value' =>'isset($data->invitedUser->joomla_id) ? "Yes" : "NO"',

               'header' => 'Registered'

           ),

    

    )

));

?>



(I am sorry for my English)

First thing you should understand how cgridview works.

Every request in cgridview is ajax request. Form request URL is not at all related with cgridview.

Have you checked your usage of cgridview. I think you have problem in usage of cgridview :)

Just follow this way.

$this->widget(‘zii.widgets.grid.CGridView’, array(

'id'=&gt;'ex-grid',


'dataProvider'=&gt;&#036;model-&gt;search(),


//'rowCssClassExpression'=&gt;'&#036;this-&gt;dataProvider-&gt;data[&#036;row]-&gt;pgm_id',


'filter'=&gt;&#036;model,


'columns'=&gt;array(


	array(


		'name'=&gt;'pgm_title',


		'type'=&gt;'raw',


		'value'=&gt;'CHtml::link(&#036;data-&gt;pgm_title, array(&quot;view&quot;,&quot;id&quot;=&gt;&#036;data-&gt;pgm_id))',


		'htmlOptions'=&gt;array('width'=&gt;'320px'),


	),

[size=2] [/size][size=2]array([/size]

		'name' =&gt; 'pgm_duration_year',


		'header'=&gt; 'Dauer Jahr/Sem',


		'type' =&gt; 'raw',


		'value' =&gt; '&#036;data-&gt;pgm_duration_year . &quot;/&quot; . &#036;data-&gt;pgm_duration_sem',


		'htmlOptions'=&gt;array('width'=&gt;'122px')


	),

[size=2] [/size][size=2]array([/size]

		'name' =&gt; 'pgm_cost',


		'header'=&gt; 'Kosten',


		'type' =&gt; 'raw',


		'value' =&gt; '&#036;data-&gt;pgm_cost .&quot; &amp;euro;&quot;'


	),

));

?>