i am using the CGridView-widget for displaying some data.
I made it multiselectable and on pressing a button I am gettin all selected rows’ data-primary-key by
How do i get the rows now by this data-primary-key?
Explaination on why i need this:
I’d like to do something for each row with ajax-requests and if it succeeds remove the row by JS or mark it with red background if it fails.
Any hints on his?
Perhaps I didn’t explained it understandable.
So I try once again:
I collect the selected rows PK by
Now I’d like to do something like
Is this possible?
Try setting a class for each row with CGridView.rowCssClass e.g class_1, class_2, class_3 where the number should match with your PK’s of the rows.
var row = $("#myyiigridview .class_[PK]");
Also look at topic Row id in CGridView…
Hope it helps you
thanks a lot for your idea. I solved like following …
'rowCssClassExpression' => '($row%2?"even":"odd")." row_data_id_" . $data->id',