|
<< Click to Display Table of Contents >> Navigation: Telegram > 2023 > 12 > 22 > Telegram_2023-12-22T08 |
2023-12-22T08:27:28
Sorry. Here I am.
Not really what I need... I try to explain
1. I create a TIWCheckBox at runtime, for example when clicking a button
2. In the template there is no knowledge about this checkbox
3. I would like to add a {%MyIWCheckbox%} at runtime and then run a function (for example \renderTheMyticalTag('{%MyIWCheckbox%}')\) and obtain the HTML to integrate in the page
2023-12-22T08:28:37
And the component must works as a IW component. It is not good to have only the HTML and the checkbox not working server side
2023-12-22T08:30:59
I think I know what you mean but creating components at runtime is quite difficult for intraweb to process from my experience. It’s much easier for me to have existing components with varying visibility and change their properties as needed. Put the checkbox in the template initially then make it visible and with necessary details whenever you were trying to create it at runtime.
2023-12-22T08:33:28
Creating components at runtime works in some cases, for example in an IWGrid I create .Control TIWButtons in cells in an async event and they render fine, but for initial components without a parent that it can be added to in a property, I’m not sure.
2023-12-22T08:34:45
yes it is. The big limit of cell is that it can contain a TIWCustomControl but not an IWRegion...
2023-12-22T08:36:08
It is exactly here my problem. In a grid cell I have to render some comps, and I have to \rack my brain\ to solve this (single!) limitation
2023-12-22T08:36:51
It works for me, what version of intraweb are you using? When I switched to 15 this worked however an earlier version I was having to force refresh the page to see the new rows.
2023-12-22T08:37:21
Are you adding the components to a TIWGrid.Cell.Control in an async event?
2023-12-22T08:37:43
One cell -> One control
2023-12-22T08:38:23
If you need two or three controls inside a single cell, you can't
2023-12-22T08:38:52
Not possible as far as I know. Could you use multiple cells and remove the borders so it looks like one big cell?