CGridView "Quick View"

Would it be possible to implement some sort of "quick view" feature within the CGridView? For example suppose you could click on a quick view icon in each row, which would slide down a new section and make an AJAX call to display more details of the item. It would probably need to be a TR->TD tag with a colspan attribute.

Anybody done something like this?

What about a CJuiDialog? You can load item details into it with ajax and don’t touch a table (what can be a problem). Also it looks nice to me :)

Yeah, I thought about that too. However it would be much nicer to have a nice slideDown effect to display the data in the CGridView instead. Would really prefer this over the Dialog box!

Yes, but I still think altering a table is not the best idea :) Maybe some kind of tooltip…

Chive has some kind of that IIRC. :)

So, does anybody have any suggestions for this?

I think I do…

Insert buttons in the first column and then in the onclick event handler you insert a new grid in a floating div just under the current row.

It should work.

haven’t tried.

But it’s what others do:

1997

jqgrid-subgrid.png

I am currently looking into DataTables which looks awesome.

They’ve got this example:

http://www.datatables.net/examples/api/row_details.html

I know I could edit my posts, but a new one is so much easier… :P

Here:

http://trirand.com/blog/jqgrid/jqgrid.html

Check out the Advanced - Subgrid demo.

jqGrid download page

Not sure if there is a Yii extension for that?