I have a jqGrid with a drop-down (select) column. When the select's selected option changes, I need to run some validation. I've got the change
event firing fine, but I can't figure out the syntax I need to use to get the selected option. Usually, this is simple with this:
$("#someDropDownId option:selected").text();
I can construct the drop-down's ID at runtime, but for the life of me can't figure out how to get the selected text.
var rowId = $("#grid").jqGrid('getGridParam', 'selrow');
var selectId = rowId + '_Description';
//selectId is the ID of the select element, how do I get the selected value now??
I've tried all manner of combinations, for example, $("selectId option:selected").text();
, but I can't figure it out. Is it possible, and if so, what is the syntax?