Select element is added to jqgrid column using code below.
If cursor is over margin area in cell (between select element and cell border), strange tooltip containing all discounts (select element content rendered as text) appears.
"title":"Click in combo to select discount"
is ignored and never shown.
How to show tooltip “Click in combo to select discount” in this case ?
If mouse is hover select element proper tooltip “Select discount by clicking here”
appears.
colmodel:
{"formatter":discountFormatter
"name":"Discount",
"title":"Click in combo to select discount",
"width":50
}
var discount = '<select style="width:100%" title="Select discount by clicking here" onchange="discountOnChange(this)">', i;
for (i = 0; i <= 50; i++) {
discount += '<option value="' + i.toString() + '">' + i.toString() + '%</option>';
}
discount += '</select>';
function discountFormatter() {
return discount;
}
If you want that tooltip will be displayed on the whole cell you should set
titleattribute on the cell (<td>) instead of setting it only on<select>.sellattris the best to do this: