Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Cell Hover is not working on list grid disabled rows.

    Hi,
    I have a list grid with some enabled and some disabled rows.
    I am setting the hover on a cell.
    When I hover I am getting hover on enabled rows properly, but not getting it on disabled rows.
    Here is the sample for your reference.

    ListGrid myGrid = new ListGrid();
    ListGridField fld1 = new ListGridField("Status");
    fld1.setShowHover(true);
    ListGridField fld2 = new ListGridField("Name");
    ListGridField fld3 = new ListGridField("Description");
    fld3.setShowHover(true);
    myGrid .setFields(fld1,fld2,fld3);
    myGrid.setData(getRecords());

    The getRecords function returns records with some set to disabled based on some business logic.
    record.setEnabled(false); Where record is ListGridRecord.

    #2
    Disabled rows are non-interactive, they don't fire events, include hover. If you need a hover for those rows you might consider not setting them as disabled, but instead using styling APIs to render them differently? The best approach depends on the total set of behaviors they are meant to have.

    Comment


      #3
      Thanks for your quick reply

      I am getting several advantages by setting them as disabled.
      as I am using
      grid.setSelectionType(SelectionStyle.SIMPLE);
      grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
      When I set certain rows disabled, the check boxes for these rows are disabled. The check and uncheck of the check box in the header row skips the disabled rows.
      Is there any workaround that I can use to get the functionality I am looking for.

      Comment


        #4
        If an instant rather than delayed hover is acceptable, use the MouseMove event (which still fires) to call Hover.show() and Hover.hide() directly.

        Comment


          #5
          disabled rows and disabled selection checkbox

          You can combine overriding canEditCell and getCellCSSText methods, avoiding disabling of rows.
          In this way selection checkbox remains enabled and you can select/deselect rows even though all others cell (fields) of records are not editable, but still responding to hover event, I suppose.

          HTH,
          falco

          Comment

          Working...
          X