TwebResonsiveGrid OnItemClick

I want to use this component, but it brings problems. 

At start, Iset some Items. Then after click I do Items.clear an add the next Items and so on, so the grid gets new items often.
The problem is the message below, the program goes on. What can I do?

I
Uncaught TypeError: Cannot read property 'classList' of null | TypeError: Cannot read property 'classList' of null at Object.HandleDoClick (http://localhost:8000/SelforClient/SelforClient.js:47286:14) at HTMLDivElement.cb (http://localhost:8000/SelforClient/SelforClient.js:222:26)
at http://localhost:8000/SelforClient/SelforClient.js [47286:14] 

Do you have some sample source project with which we can reproduce this here, so we know what exact settings & what exact code you use to cause this issue?

Yes here is some code:


procedure tform1.setgroupbuttons(obergruppe:integer);
var aitem:twebresponsivegriditem;
 foundgroup:boolean;
begin

  begin
    foundgroup:=false;
    dm.cdsag.first;
    repeat
      if dm.cdsag.FieldByName('OBERGRUPPE').AsInteger=obergruppe then
      foundgroup:=true;
      dm.cdsag.Next;
    until dm.cdsag.eof;
    if foundgroup  then
    begin
      webrg.BeginUpdate;
      webrg.items.Clear;
      begin
        if obergruppe>0 then
        begin
        aitem:=webrg.Items.Add;
        aitem.HTML:='<strong>Zurück '+inttostr(obergruppe)+'</strong>'+
        '<br><IMG width="96px" src="img/Back.png">';
        aitem.Tag:=100000;
        end;
      end;
      dm.cdsag.First;
      repeat
        if dm.cdsag.FieldByName('OBERGRUPPE').asinteger=obergruppe then
        begin
         aitem:=webrg.Items.Add;
         aitem.HTML:='<strong>'+dm.cdsag.FieldByName('BUTTONTEXT').asstring+'</strong>';
        {'<br><IMG width="96px" src="img/'+dm.WDSAnzeigegruppenPICTURE.asstring+'">';}
         aitem.Tag:=dm.cdsag.FieldByName('ID').AsInteger;
        end;
        dm.cdsag.Next;
        until dm.cdsag.eof;
      webrg.EndUpdate;
    end else
    begin

    end;
  end;
end;
procedure TForm1.WebRGItemClick(Sender: TObject; Index: Integer);
var aitem:twebresponsivegriditem;
agr:integer;
begin
   aitem:=webrg.items[index];
   agr:=aitem.Tag;

   if agr>1000000 then
   begin
    BucheArtikel(aitem);
   end else
   begin
     if agr=100000 then
       agr:=0;
     setgroupbuttons(agr);
   end ;
    { dm.WDSAnzeigegruppen.Close;
     dm.WDSAnzeigegruppen.QueryString:='$filter=(OBERGRUPPE eq '+inttostr(dm.aobergruppe)+')&$orderby=BTNNR';
     dm.wdsanzeigegruppen.Load; // ----------> afteropen }


end;

Explanation:

cdsag is a twebclientdataset wihe 3 Fields, ID(integer), Buttontext (string) and Obergruppe (integer). It has 4 records with Obergruppe = 0 and 100 Records with Obergruppe >0.

After start the program calls setgroupbuttons(0) and the four items where shown. Then click on one the items are shown as expected.

After click the Back-Button the 4 Buttons with Obergruppe = 0 where shown and the error message was visible. You can continue, the program isch still working as expected.

I did watch it with debugger, it seems the loop repeat .. until brings the problem

We traced and solved this issue. The next update will address this.

Ok thank you. Is there any possibility that I can get it or can I do something by myself?

 I want to  continue this application

Please contact us by email if you need an urgent update.

Thank you,


this has solved the problem