Quantcast
Channel: OutSystems Community
Viewing all articles
Browse latest Browse all 1476385

[Forums] How to access TableRecord in an Extension

$
0
0
I belive i did not explain myself well. I have a generic form that contains a table with 50 columns.
In this form is possible to generate different reports, each report has as an output a diferent number of columns.
So, what i pretend is to hide on each report output the columns that are not used.
For that i create a extension to hide the columns. That extension uses a recursive method to get and remove the columns that should not appear.

There is a strange conflit between the Function AddMetaTag (from extension HTTPRequestHandler) and the Recursive algorihtm that is used to achieve the column.

In my extension i have the following code:

HeContext heContext = AppInfo.GetAppInfo().OsContext;
Page currentPage = heContext.CurrentScreen;
Control wb = FindControlByClientID(currentPage.Controls[0], ssWebBlockRuntimeId); 
...
 private Control FindControlByClientID(ControlCollection controls, string clientID)
{
foreach (Control c in controls)
{
if (c.ClientID == clientID)
{
return c;
}
Control innerResult = FindControlByClientID(c.Controls, clientID);
if (innerResult != null)
return innerResult;
}
return null;
}


Viewing all articles
Browse latest Browse all 1476385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>