Yii Framework Forum: [Solved]CGridView search not working if set 'ajaxUpdate'=>false - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Solved]CGridView search not working if set 'ajaxUpdate'=>false Rate Topic: -----

#1 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 04 July 2010 - 05:24 AM

I've created a CGridView object and because I want mobile phone can also access my web application, I decided to turn off the ajax. (some phone browser haven't supported ajax yet). So I type like this in my code

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'inventory-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'ajaxUpdate'=>false,
	'columns'=>array(
		'id',
		'sku',
		'name',
		'description',
		'weight',
		'weight_uom',
		array(
			'class'=>'CButtonColumn',
		),

		
	)
)); ?>


The CGridView does turn off the ajax for Sorting and pagination. But the search just won't work. I try to type something it just show a "loading" gif for a while. Nothing really happen. No search, no jumping to the other page, or anything. The Advance Search just the same.
Why is it? And how to fix it? Thanks :)
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,339
  • Joined: 12-October 09
  • Location:Croatia

Posted 04 July 2010 - 07:24 AM

As currrent implementation search/filtering works only with ajax...
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 04 July 2010 - 10:10 AM

View Postmdomba, on 04 July 2010 - 07:24 AM, said:

As currrent implementation search/filtering works only with ajax...


That's a pity :(
So is there anyway for workaround. I really need a non-ajax search function...
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#4 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 05 July 2010 - 01:40 AM

You can copy the html code of the GridView and redo it with php.

Is not a very nice solution, but that is how we were working before Zii widget, so is not so terrible... :)

By the way I recently had to do it too because I need the seach to submit a form, and I found no solution for do it by using CGridView.
0

#5 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 05 July 2010 - 06:03 PM

View Postzaccaria, on 05 July 2010 - 01:40 AM, said:

You can copy the html code of the GridView and redo it with php.

Is not a very nice solution, but that is how we were working before Zii widget, so is not so terrible... :)

By the way I recently had to do it too because I need the seach to submit a form, and I found no solution for do it by using CGridView.


Yay, the release Yii 1.1.3 has solves this problem :)
It just perfect timing...
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users