Where to find documentation for $.fn.yiiGridView methods?

Hello,

Where can I find documentation on all methods and parameters that can be used with $.fn.yiiGridView (like update, getSelection, etc.)?

I have an ajaxform that inserts a new row into a CGridView, which is working perfectly (I pieced it together reading multiple forum posts). Before the row is rendered in the CGridView, I’d like to change one of the cells to display “Running…” text (a user controls a timer via a link to stop a clock). I don’t even know where to start but I have not been able to find good documentation on all the methods and parameters available with $.fn.yiiGridView. If you can point me to some documentation that would really help.

Thanks.

Maher

Hello

On the top of my head, you could use jQuery’s Ajax events to achieve what you want.

Cheers

As far as I can tell, the functions are defined and documented in file /framework/zii/widgets/assets/gridview/jquery-yiigridview.js. That’s in addition to anything mentioned in the CGridView class document.

Thanks SteveD. I’m a bit of a newbie so the more documentation/use cases the better. CGridView seems like a popular feature and the $.fn.yiiGridView is a very useful tool for implementing web 2.0 functionality.

I looked at that file before but it didn’t help me achieve some of what I was trying to do and was only able to accomplish my objectives with the help of forum members (e.g. pass some parameters from a dialog to filter CGridView table). Might have been because I’m a newb and can’t read the code in the file like some people read newspapers…

i have this problem too , i find it helpful : http://www.yiiframework.com/wiki/410/create-custom-button-button-with-ajax-function-in-cgridview/

also :

but i want update my CListView on click on the ‘delete’ link i think I should do this but it is not working :




        echo CHtml::link('delete',CController::createUrl("/dashboard/bookdelete", array("id"=>$data->id)),array('click'=>"


                $.ajax( {  //change my-grid to your grid's name

                    type:'POST',

                    url:$(this).attr('href'),

                    success:function(data) {

                          $.fn.yiiListView.update('bookList'); //change my-grid to your grid's name

                          alert('afaf');

                    }

                })




        "));




but it is work with this solution:

http://www.yiiframework.com/forum/index.php/topic/39946-how-to-update-the-clistview-after-deletion-of-record-using-ajax-request/




        echo CHtml::ajaxLink("Delete",array("dashboard/bookdelete","id"=>$data->id),array(


            "beforeSend" => 'js:function(){if(confirm("Are you sure you want to delete?"))return true;}',

            "success"=>'js:function(data){$.fn.yiiListView.update("bookList",{});}',

            "type"=>"post",


        ),array("id"=>$data->id));



i’m confused why this work and that dose not ?!?!

i think it is just because there is not any documentation !