Icon View Incident Report

Serious Serious
Reported By: Chris Holland
Reported On: 7/22/2013
For: Version 1.02 Build 2
# 3929 Hidden First Column in Grid Can Cause DOM Property Error

I have come across a strange problem where I get an error if the first column in my grid is marked as visible := false;

The error tells me that it "cannot get offsetTop for a null value".

I have managed to overcome the problem by testing for null in the source code MakeCellVisible procedure, but was wondering if this is a bug or if this value should never be null and I am doing something wrong to have this value returned as null?

procedure TGridColumn.MakeCellVisible(RowIndex: Integer);
var
   TempCell: THTMLElement;
   TempScrollTop: Integer;
   TempGridOffset: Integer;
   TempCellOffset: Integer;
begin
   MakeColumnVisible;
   TempCell:=GetCellElement(RowIndex);
   if TempCell <> nil then // <------------   ADDED THIS TEST HERE
      begin
         TempScrollTop:=FGrid.Table.scrollTop;
         TempGridOffset:=(TempScrollTop+FGrid.Table.clientHeight);
         TempCellOffset:=(TempCell.offsetTop+TempCell.offsetHeight);
         if (TempCellOffset > TempGridOffset) then

FGrid.Table.scrollTop:=(TempScrollTop+(TempCellOffset-TempGridOffset))
         else if (TempCell.offsetTop < FGrid.Table.scrollTop) then

FGrid.Table.scrollTop:=(FGrid.Table.scrollTop-(FGrid.Table.scrollTop-TempCell.offsetTop));
      end;
end;



Resolution Resolution
Fixed Problem on 7/22/2013 in version 1.03 build 1


Products Affected Products Affected
Elevate Web Builder
Elevate Web Builder Trial

Image