olex
(Olysyuk)
May 16, 2010, 12:43pm
1
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?
olex
(Olysyuk)
May 16, 2010, 4:03pm
2
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)
xicath
(Xicath)
May 17, 2010, 3:49am
3
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?