Yii Framework Forum: CGridView filter extension - Yii Framework Forum

Jump to content

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

CGridView filter extension How to make externaly managable js field Rate Topic: -----

#1 User is offline   Olexander 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 03-May 10

Posted 16 May 2010 - 07:43 AM

Hi everyone

I have a generated CRUD with CGridView for article management.
Also i have an extjs treeView which is used to display categories. Articles is contected with Categories with many-to-many relation.

There is a function that catches category-click event.
How can i add hidden field to CGridView filter which will be changed with function and force CGridView ajax update?
0

#2 User is offline   Olexander 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 03-May 10

Posted 16 May 2010 - 11:03 AM

Allready done with

'filter'=>'<input type="hidden" name="Content[category_id]" id="update_by_tree" value="'.$model->category_id.'"/>',


And such js in function:
   tree.on('click',function(n) { 
                        $('#update_by_tree').val(n.id);
                        $('#update_by_tree').change();
                    } );


And model modification (added public $category_id and modified search method)
0

#3 User is offline   fastcrash 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 245
  • Joined: 10-March 10
  • Location:South Jakarta

Posted 16 May 2010 - 10:49 PM

hi olexander,
may i ask, is your js tree work when you click to page two or interact with ajax action such search or sort record?, mine not works (ckeditor), i wonder why.

is there any method must i set?
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