|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi, How can I refer a control inside a Flyout? See the HTML code below:
Code: HTML/ASPX
<eo:Flyout ID="fotStatusList" runat="server" ExpandDirection="BottomLeft" For="lblTitleStatus" OffsetY="8">
<ContentTemplate>
<div id="div1" onclick="return divMenuPrint_onclick()" style="border-top-width: thin;
border-left-width: thin; border-left-color: #003399; border-bottom-width: thin;
border-bottom-color: #003399; color: #003399; border-top-color: #003399; border-right-width: thin;
border-right-color: #003399">
<table cellpadding="0" cellspacing="0" id="TabStatusListFrame">
<tbody>
<tr>
<td style="background-image: url(images/gray_top_left.jpg); width: 12px; height: 12px">
</td>
<td style="background-image: url(images/gray_top_center.jpg)">
</td>
<td style="background-image: url(images/gray_top_center.jpg)">
</td>
<td style="background-image: url(images/gray_top_center.jpg)">
</td>
<td style="background-image: url(images/gray_top_right.jpg); width: 12px">
</td>
</tr>
<tr>
<td style="background-image: url(images/gray_middle_left.jpg); width: 12px; height: 63px;">
</td>
<td style="width: 15px; background-color: #f2f2f2; height: 63px;">
</td>
<td style="vertical-align: middle; background-color: #f2f2f2; text-align: left; height: 63px;">
<table id="TabStatusList" border="0" cellpadding="0" cellspacing="0" style="font-size: 7pt;
color: #630000; font-family: Verdana">
<tr>
<td style="font-weight: bold; vertical-align: top; width: 120px; height: 20px; text-align: left">
Status</td>
<td style="font-weight: bold; vertical-align: top; width: 80px; text-align: center; height: 20px;">
Date</td>
<td style="font-weight: bold; vertical-align: top; width: 120px; text-align: center; height: 20px;">
Dt.Proc.</td>
</tr>
<tr>
<td style="vertical-align: middle; height: 12px; text-align: left">
Ative</td>
<td style="vertical-align: middle; text-align: center">
99/99/9999</td>
<td style="vertical-align: middle; text-align: center">
99/99/9999 99:99:99</td>
</tr>
</table>
</td>
<td style="width: 15px; background-color: #f2f2f2; height: 63px;">
</td>
<td style="background-image: url(images/gray_middle_right.jpg); width: 12px; height: 63px;">
</td>
</tr>
<tr>
<td style="background-image: url(images/gray_bottom_left.jpg); width: 12px; height: 12px">
</td>
<td style="background-image: url(images/gray_bottom_center.jpg)">
</td>
<td style="background-image: url(images/gray_bottom_center.jpg)">
</td>
<td style="background-image: url(images/gray_bottom_center.jpg)">
</td>
<td style="background-image: url(images/gray_bottom_right.jpg); width: 12px">
</td>
</tr>
</tbody>
</table>
</div>
</ContentTemplate>
</eo:Flyout>
I need refer the table "TabStatusList". But, the Flyout "fotStatusList" controls count is equal to 3, and none of them is the table "TabStatusList". Thanks in advance, Marcelo Camarate
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You will use the following code to get the root control of the ContentTemplate:
Control ctrl = fotStatusList.Controls[1];
Once you have the root control, you can then call FindControl with the control ID to find your controls.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi, Thanks for your quick reply, but I don't understand it very well. Using the HTML code that I posted, I need to change the HTML table "TabStatusList" in a ASP / VB.NET code. For this, I made the VB.NET code below:
Code: Visual Basic.NET
Dim FlyoutTable As Control
FlyoutTable = Me.fotStatusList.Controls(1).FindControl("TabStatusList")
But, when I execute the code, the control "FlyoutTable" is not loaded. What am I doing wrong? Regards, Marcelo Camarate
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We do not troubleshoot your code. We only tell you fotStatusList.Controls(1) is the root control of the content template (It holds all the content control). FindControl is an ASP.NET function. So if fotStatusList.Controls(1) returns the wrong value, then we will take a look. Otherwise you will need to troubleshoot the rest.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi, Can anyone help me, please? I'm still having problems to refer a Web control inside a Flyout, using a VB.NET code. See the Flyout definition below:
Code: HTML/ASPX
<eo:Flyout ID="fotStatusList" runat="server" ExpandDirection="BottomLeft" For="lblTitleStatus" OffsetY="8">
<ContentTemplate>
<div id="div1" onclick="return divMenuPrint_onclick()" style="border-top-width: thin;
border-left-width: thin; border-left-color: #003399; border-bottom-width: thin;
border-bottom-color: #003399; color: #003399; border-top-color: #003399; border-right-width: thin;
border-right-color: #003399">
<table cellpadding="0" cellspacing="0" id="TabStatusListFrame">
<tbody>
<tr>
<td style="background-image: url(images/gray_top_left.jpg); width: 12px; height: 12px">
</td>
<td style="background-image: url(images/gray_top_center.jpg)">
</td>
<td style="background-image: url(images/gray_top_center.jpg)">
</td>
<td style="background-image: url(images/gray_top_center.jpg)">
</td>
<td style="background-image: url(images/gray_top_right.jpg); width: 12px">
</td>
</tr>
<tr>
<td style="background-image: url(images/gray_middle_left.jpg); width: 12px; height: 63px;">
</td>
<td style="width: 15px; background-color: #f2f2f2; height: 63px;">
</td>
<td style="vertical-align: middle; background-color: #f2f2f2; text-align: left; height: 63px;">
<table id="TabStatusList" border="0" cellpadding="0" cellspacing="0" style="font-size: 7pt;
color: #630000; font-family: Verdana">
<tr>
<td style="font-weight: bold; vertical-align: top; width: 120px; height: 20px; text-align: left">
Status</td>
<td style="font-weight: bold; vertical-align: top; width: 80px; text-align: center; height: 20px;">
Date</td>
<td style="font-weight: bold; vertical-align: top; width: 120px; text-align: center; height: 20px;">
Dt.Proc.</td>
</tr>
<tr>
<td style="vertical-align: middle; height: 12px; text-align: left">
Ative</td>
<td style="vertical-align: middle; text-align: center">
99/99/9999</td>
<td style="vertical-align: middle; text-align: center">
99/99/9999 99:99:99</td>
</tr>
</table>
</td>
<td style="width: 15px; background-color: #f2f2f2; height: 63px;">
</td>
<td style="background-image: url(images/gray_middle_right.jpg); width: 12px; height: 63px;">
</td>
</tr>
<tr>
<td style="background-image: url(images/gray_bottom_left.jpg); width: 12px; height: 12px">
</td>
<td style="background-image: url(images/gray_bottom_center.jpg)">
</td>
<td style="background-image: url(images/gray_bottom_center.jpg)">
</td>
<td style="background-image: url(images/gray_bottom_center.jpg)">
</td>
<td style="background-image: url(images/gray_bottom_right.jpg); width: 12px">
</td>
</tr>
</tbody>
</table>
</div>
</ContentTemplate>
</eo:Flyout>
I need to make reference to the HTML table called "TabStatusListFrame"within the Flyout. Based on the reply posted by eo_suport, I wrote the following VB.NET code:
Code: Visual Basic.NET
Dim TableCtl As Table
TableCtl = fotStatusList.Controls(1).FindControl("TabStatusListFrame")
But the TableCtl variable is null after run it. Any idea how to fix this? Regards, Marcelo Camarate
|
|