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:
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;
}