04-10-2023, 04:44 AM
(This post was last modified: 04-10-2023, 04:46 AM by Alexandre Machado.)
If you are forcing a component to re-render in Async, like an IWGrid, please use the OnFindParentId event of the IWTemplateProcessorHTML component.
This is an example code of how it should be:
In this event you specify where the IWGrid should be inserted, i.e. what is the HTML element that should be the grid's immediate parent. You just need to provide a DOM Id of the HTML element (it doesn't even need to exist in your IntraWeb form)
Please let me know if ti works
This is an example code of how it should be:
Code:
procedure TIWForm1.IWTemplateProcessorHTML1FindParentId(
Sender: TIWTemplateProcessorHTML; AContainerContext: TIWContainerContext;
const AComponent: TComponent; out AParentId: string);
begin
if AComponent = MyIWGrid then
begin
AParentId := 'some_div';
end;
end;
In this event you specify where the IWGrid should be inserted, i.e. what is the HTML element that should be the grid's immediate parent. You just need to provide a DOM Id of the HTML element (it doesn't even need to exist in your IntraWeb form)
Please let me know if ti works