TWebDBResponsiveGrid scopes

Hi,
I'm currently experimenting with TWebDBResponsiveGrid in a form that inherits from a base form. I've added an HTML button inside the grid using the Options.ItemTemplate property.

The button's click event is correctly bound to a Pascal procedure, and that procedure does execute as expected.

However, inside that procedure, I'm having trouble accessing the actual grid instance. The only references available seem to be to base classes or generic types, which means I can't directly interact with the grid—for example, to update its data or change its appearance.

In a standard form I can access the specific TWebDBResponsiveGrid instance from within that event handler by just specifying the form/owner before referencing the grid (e.g., Form1.WebDBResponsiveGrid1) but this doesn't work for inherited forms.

I'm attaching a simple demo with comments to help clarify the issue.
DBRespGrid ScopeTest.zip (60.8 KB)

Any update on this?

I’ve found a temporary workaround by storing the current instance of my custom component (based on the grid) in a global variable on the window object:

{$IFDEF PAS2JS}
asm
if (!window.GridInstances) window.GridInstances = {};
window.GridInstances[this.FID] = this;
end;
{$ENDIF}

This seems to work for now, but I’m unsure if it’s the best or most robust approach. Are there any alternative or improved methods you’d recommend?

I'm sorry but I do not understand the problem. In the inherited form, the WebDBResponsiveGrid1 is accessible.
For example, I added the code to your button click in the inherited form:

WebDBResponsiveGrid1.Color := clYellow;

and this shows the grid is accessible.
If somehow your problem is different, please explain.