Select Dropdownlist (Value Of A Column Cgridview) Without Triggering The Event Click On The Line

Hi all,

The value of my column in the CGridView is a dropdownlist. In the property "selectionChanged" I put a redirect to another page, the problem is that when the dropdownlist is selected, the page redirects.

I want select the dropdownlist, change its value, and click on the image "W" without the redirection takes place.

Thanks

Dear Friend

I am having a two models(District,Block).One district has many blocks.

I am displaying all the blocks of a district as a dropdownlist in district grid.

By clicking the icon in the next column, I am directing to the Detailed View of the block selected.




Yii::app()->clientScript->registerScript('link','

$("body").on("click","#district-grid a[title=\"blockView\"]",function(){	

	var bid=$(this).parent().prev().find("select").val();

	window.location="'.CHtml::normalizeUrl(array('block/view')).'&id="+bid;

	});

    return false;

');



I hope I helped a bit.

Regards.

3635

dropdown.png

I second seenivasan.

You would be better using click event on certain column(s) instead of selectionChanged event of the whole row to do the redirection.