hover not working if listgrid record is in edit mode

Hi Iso,

I have a situation where I have only few editable fields and rest of them are not editable. When I edit the record only few of them go in edit mode.

The fields which are not editable stops showing hover if I go in edit mode.
Is this possible anyhow?

Ashish.

How did you configure the hover? ListGrid has various hover APIs. If you doing hover solely via FormItem APIs, those will not show for non-editable fields.

I have field declaration in DataSource as below :

<field>
<name>damageCode</name>
<type>text</type>
<wrap>true</wrap>
<title>Damage Code</title>
<showPickerIcon>true</showPickerIcon>
<length>10</length>
<required>true</required>
<pickerIconSrc>toolstrip/search.png</pickerIconSrc>
<showPicker>
<JS>
function(modal, icon, pickerProperties,rect) {
var criteria ={};
criteria[“ownerCode”] = this.grid.parentElement.parentElement.parentElement.form.getValue(“ownerCode”);
criteria[“facilityCode”] = this.grid.parentElement.parentElement.parentElement.form.getValue(“facilityCode”);
ias.Action.showEditorSearchLookup(“damageCodeDSDMI”, this, criteria);
}
</JS>
</showPicker>
<showHover>true</showHover>
<canHover>true</canHover>
<cellHover>
<JS>
function (record, rowNum, colNum){
alert (“test”);
if(record.damageCodeDesc != null)
return record.damageCodeDesc;
else
return ‘None’;
}
</JS>
</cellHover>
</field>

Any update on this one.

Hi Ashish,

You can make this work by defining a ‘cellHoverHTML’ handler at the ListGrid level (not at the field level).

The default listGrid.cellHoverHTML always returns null while the user hovers over the edit row - if you override this method you can return hover HTML even if the row being hovered over is in edit mode.

A couple of other notes:

  1. The field-level hover is actually ‘hoverHTML’ not ‘cellHoverHTML’ as written in the code snippet below. field.cellHoverHTML would never fire, whether in edit mode or not.
    field.hoverHTML will work, but as stated above, not while the grid is in edit mode, for the edit row. For that behavior you need to override ‘cellHoverHTML’ at the grid level.

  2. The above solution assumes you want to show hovers over non editable fields in the edit row. If you also need hovers over the live edit items within the edit row, you may need to use ‘editorProperties’ to apply an ‘itemHoverHTML’ handler to the generated form item

Thanks
Isomorphic Software