Yii Framework Forum: Multiple CGridViews, single view, filtering issue - Yii Framework Forum

Jump to content

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

Multiple CGridViews, single view, filtering issue Rate Topic: -----

#1 User is offline   Eric C 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 26-January 11

Posted 06 May 2011 - 02:25 PM

I have two CGridViews on the same View using the same Model.

When filtering is performed, in both cases the ajax request is $_GET['ModelName']. In other words, I get the same filter request from both CGridViews. How can I change the $_GET key for one of the CGridViews so that my requests are different?
0

#2 User is offline   waterloomatt 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 545
  • Joined: 09-April 10

Posted 06 May 2011 - 02:29 PM

Have you set a different Id for each CGridView?

Matt

View PostEric C, on 06 May 2011 - 02:25 PM, said:

I have two CGridViews on the same View using the same Model.

When filtering is performed, in both cases the ajax request is $_GET['ModelName']. In other words, I get the same filter request from both CGridViews. How can I change the $_GET key for one of the CGridViews so that my requests are different?

0

#3 User is offline   Eric C 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 26-January 11

Posted 06 May 2011 - 02:34 PM

View Postwaterloomatt, on 06 May 2011 - 02:29 PM, said:

Have you set a different Id for each CGridView?


Yes, they have unique ID's
0

#4 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 06 May 2011 - 02:53 PM

View PostEric C, on 06 May 2011 - 02:25 PM, said:

I have two CGridViews on the same View using the same Model.

When filtering is performed, in both cases the ajax request is $_GET['ModelName']. In other words, I get the same filter request from both CGridViews. How can I change the $_GET key for one of the CGridViews so that my requests are different?


This thread may have a solution for your case.

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
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