473,387 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Adding webcontrols.table to aspx - not rendering

Sue
On code-behind page:
(attributes set programatically for each of these elements)
linkbutton added to tablecell
textbox added to tablecell
tablecells added to tablerow
tablerow added to table (table.ID is TestTable)
On .aspx page:
<HeaderTemplate>
<asp:Table ID="TestTable" runat="Server" />
</HeaderTemplate>

Source code on .aspx page in browser shows the table and it's controls are
correctly created and placed. Controls for the Linkbutton and Textbox do
not display in browser. I suspect it has something to do with the
runat="server" attribute for the linkbutton or textbox for which I do not
find an attribute I can set (e.g. linkbutton.runat = "server"). Any ideas
on how I can get these elements to display?

tia,
Sue W.

Jul 19 '05 #1
5 5248
Hi Sue,

This problem doesn't occur to the following code snippet. Does it work on
your side? If so, you may want to show me the code snippet on your side so
that I can test it. Thanks.

private void Page_Load(object sender, System.EventArgs e)
{
int numrows = 3;
int numcells = 2;
for (int j=0; j<numrows; j++)
{
TableRow r = new TableRow();
for (int i=0; i<numcells; i++)
{
TableCell c = new TableCell();
LinkButton lb=new LinkButton ();

lb.Text=i.ToString();
if(i==0)c.Controls.Add(lb);
else c.Controls.Add(new TextBox());
r.Cells.Add(c);
}
Table1.Rows.Add(r);
}
}

Best Regards,
Lewis Wang
Support Professional

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| MIME-Version: 1.0
| X-MIMETrack: Serialize by Notes Client on Susan L WILLIS/MUL/OJD(Release
6.0.1|February
| 07, 2003) at 07/23/2003 11:45:57 AM,
| Serialize complete at 07/23/2003 11:45:57 AM,
| Serialize by Notes Client on Susan L WILLIS/MUL/OJD(Release
6.0.1|February
| 07, 2003) at 07/23/2003 11:46:02 AM,
| Serialize complete at 07/23/2003 11:46:02 AM
| From: Su*@ojd.state.or.us
| Subject: Adding webcontrols.table to aspx - not rendering
| X-Newsreader: Lotus Notes Release 6.0.1 February 07, 2003
| Content-Type: text/plain; charset="US-ASCII"
| Message-ID: <#T**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.general
| Date: Wed, 23 Jul 2003 11:46:03 -0700
| NNTP-Posting-Host: 159.121.96.200
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102197
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| On code-behind page:
| (attributes set programatically for each of these elements)
| linkbutton added to tablecell
| textbox added to tablecell
| tablecells added to tablerow
| tablerow added to table (table.ID is TestTable)
| On .aspx page:
| <HeaderTemplate>
| <asp:Table ID="TestTable" runat="Server" />
| </HeaderTemplate>
|
| Source code on .aspx page in browser shows the table and it's controls
are
| correctly created and placed. Controls for the Linkbutton and Textbox do
| not display in browser. I suspect it has something to do with the
| runat="server" attribute for the linkbutton or textbox for which I do not
| find an attribute I can set (e.g. linkbutton.runat = "server"). Any ideas
| on how I can get these elements to display?
|
| tia,
| Sue W.
|
|

Jul 19 '05 #2
Hi Sue,

Thank you for your feedback.

Do you want to add a textbox and a linkbutton into table programmingly,
then put the table into a HeaderTemplate of datagrid's column? The
following code snippet demonstrates this.

If I misunderstood your concern, would you please provide more explanations
on your requirement? Thank you.

Dim CaseNumberHeaderTable As Table

Private Sub DataGrid1_ItemDataBound(ByVal sender As System.Object, ByVal e
As System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound
If e.Item.ItemType = ListItemType.Header Then
CaseNumberHeaderTable =
CType(e.Item.FindControl("CaseNumberHeaderTable"), Table)
setCaseNumberHeaderTable()
End If

End Sub

Private Sub setCaseNumberHeaderTable()

Dim CaseNumberHRow1 As TableRow = New TableRow
Dim CaseNumberHRow2 As TableRow = New TableRow
Dim CaseNumberHCell1 As TableCell = New TableCell
Dim CaseNumberHCell2 As TableCell = New TableCell

Dim CaseNumberSortButton As LinkButton = New LinkButton
Dim CaseNumberFilterBox As TextBox = New TextBox

CaseNumberSortButton.ID = "CaseNumberSortButton"
CaseNumberSortButton.Text = "Sort CaseNo"
CaseNumberSortButton.ToolTip = "Click to sort the case number
column"

CaseNumberFilterBox.ID = "CaseNumberFilterBox"
CaseNumberFilterBox.ToolTip = "Enter case number on which to filter
records"

CaseNumberHCell1.VerticalAlign = VerticalAlign.Bottom
CaseNumberHCell1.HorizontalAlign = HorizontalAlign.Center
CaseNumberHCell1.Controls.Add(CaseNumberSortButton )

CaseNumberHCell2.VerticalAlign = VerticalAlign.Top
CaseNumberHCell2.Text = "Filter by: <BR><HR><BR>"
CaseNumberHCell2.Controls.Add(CaseNumberFilterBox)
CaseNumberHRow1.Controls.Add(CaseNumberHCell1)
CaseNumberHRow2.Controls.Add(CaseNumberHCell2)
CaseNumberHeaderTable.Controls.Add(CaseNumberHRow1 )
CaseNumberHeaderTable.Controls.Add(CaseNumberHRow2 )
CaseNumberHeaderTable.ID = "CaseNumberHeaderTable"
CaseNumberHeaderTable.BorderColor = Color.Blue
End Sub
Lewis Wang

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Sue" <Su*@ojd.state.or.us>
| Sender: "Sue" <Su*@ojd.state.or.us>
| References: <#T**************@TK2MSFTNGP09.phx.gbl>
<Dy**************@cpmsftngxa06.phx.gbl>
| Subject: RE: Adding webcontrols.table to aspx - not rendering
| Date: Thu, 24 Jul 2003 11:38:45 -0700
| Lines: 87
| Message-ID: <01****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNSEtCmGhmPnX8ZQxeVikG/sDAnmg==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102328
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| >your side? If so, you may want to show me the code
| snippet on your side so
| >that I can test it. Thanks.
|
| Lewis, tried your code, but I'm working in VB and
| couldn't remember half of how to get things set up for C
| (#?). I do have a similar table working just find
| further up in the web page. It's not part of a datagrid
| though. Below is the relevant code for this problem.
|
| Protected WithEvents CaseNumberSortButton As LinkButton =
| LinkButton
| Protected WithEvents CaseNumberFilterBox As TextBox = New
| TextBox
| Protected WithEvents CaseNumberHeaderTable As Table = New
| Table
| Protected WithEvents CaseNumberHRow1 As TableRow = New
| TableRow
| Protected WithEvents CaseNumberHRow2 As TableRow = New
| TableRow
| Protected WithEvents CaseNumberHCell1 As TableCell = New
| TableCell
| Protected WithEvents CaseNumberHCell2 As TableCell = New
| TableCell
|
| Private Sub Page_Load(ByVal sender As System.Object,
| ByVal e As System.EventArgs) Handles MyBase.Load
| Call setCaseNumberHeaderTable()
| End Sub
|
| Public Sub setCaseNumberHeaderTable()
| With CaseNumberSortButton
| .ID = "CaseNumberSortButton"
| .Text = "Sort CaseNo"
| .ToolTip = "Click to sort the case number column"
| End With
| With CaseNumberFilterBox
| .ID = "CaseNumberFilterBox"
| .ToolTip = "Enter case number on which to filter
| records"
| End With
| With Me.CaseNumberHCell1
| .VerticalAlign = VerticalAlign.Bottom
| .HorizontalAlign = HorizontalAlign.Center
| .Controls.Add(CaseNumberSortButton)
| End With
| With CaseNumberHCell2
| .VerticalAlign = VerticalAlign.Top
| .Text = "Filter by: <BR><HR><BR>"
| .Controls.Add(CaseNumberFilterBox)
| End With
| With Me.CaseNumberHRow1
| .Controls.Add(CaseNumberHCell1)
| End With
| With CaseNumberHRow2
| .Controls.Add(CaseNumberHCell2)
| End With
| With CaseNumberHeaderTable
| .Controls.Add(CaseNumberHRow1)
| .Controls.Add(CaseNumberHRow2)
| .ID = "CaseNumberHeaderTable"
| .Width.Percentage(100)
| End With
| End Sub
|
| .aspx file:
|
| <asp:datagrid id=DG runat="server">
| <Columns>
| <asp:TemplateColumn SortExpression="CaseNo">
| <HeaderTemplate>
| <asp:Table ID="CaseNumberHeaderTable"
| Runat="Server" />
| </HeaderTemplate>
| ......
| </asp:TemplateColumn>
| </Columns>
| </asp:Datagrid>
|
| Any help appreciated...
|
| Sue
|
|
|
|
|
|

Jul 19 '05 #3
Sue
>If I misunderstood your concern, would you please
provide more explanations
on your requirement? Thank you.
This is exactly what I wish to do. I have tried the code
below (modified for my object names) and got an invalid
cast error message at the CType line. I know this is
simple, I'm just not tripping onto the correct syntax
<sigh>. I've tried various options for the CType without
success. Any other ideas?

tia,
Sue

Dim CaseNumberHeaderTable As Table

Private Sub DataGrid1_ItemDataBound(ByVal sender As System.Object, ByVal eAs System.Web.UI.WebControls.DataGridItemEventArgs) HandlesDataGrid1.ItemDataBound
If e.Item.ItemType = ListItemType.Header Then
CaseNumberHeaderTable =
CType(e.Item.FindControl("CaseNumberHeaderTable") , Table)
setCaseNumberHeaderTable()
End If

End Sub

Private Sub setCaseNumberHeaderTable()

Dim CaseNumberHRow1 As TableRow = New TableRow
Dim CaseNumberHRow2 As TableRow = New TableRow
Dim CaseNumberHCell1 As TableCell = New TableCell
Dim CaseNumberHCell2 As TableCell = New TableCell

Dim CaseNumberSortButton As LinkButton = New LinkButton Dim CaseNumberFilterBox As TextBox = New TextBox

CaseNumberSortButton.ID = "CaseNumberSortButton"
CaseNumberSortButton.Text = "Sort CaseNo"
CaseNumberSortButton.ToolTip = "Click to sort the case numbercolumn"

CaseNumberFilterBox.ID = "CaseNumberFilterBox"
CaseNumberFilterBox.ToolTip = "Enter case number on which to filterrecords"

CaseNumberHCell1.VerticalAlign = VerticalAlign.Bottom CaseNumberHCell1.HorizontalAlign = HorizontalAlign.Center CaseNumberHCell1.Controls.Add (CaseNumberSortButton)
CaseNumberHCell2.VerticalAlign = VerticalAlign.Top CaseNumberHCell2.Text = "Filter by: <BR><HR><BR>"
CaseNumberHCell2.Controls.Add (CaseNumberFilterBox) CaseNumberHRow1.Controls.Add(CaseNumberHCell1)
CaseNumberHRow2.Controls.Add(CaseNumberHCell2)
CaseNumberHeaderTable.Controls.Add (CaseNumberHRow1) CaseNumberHeaderTable.Controls.Add (CaseNumberHRow2) CaseNumberHeaderTable.ID = "CaseNumberHeaderTable" CaseNumberHeaderTable.BorderColor = Color.Blue
End Sub
Lewis Wang

This posting is provided "AS IS" with no warranties, and confers no rights.--------------------
| Content-Class: urn:content-classes:message
| From: "Sue" <Su*@ojd.state.or.us>
| Sender: "Sue" <Su*@ojd.state.or.us>
| References: <#T**************@TK2MSFTNGP09.phx.gbl>
<Dy**************@cpmsftngxa06.phx.gbl>
| Subject: RE: Adding webcontrols.table to aspx - not rendering| Date: Thu, 24 Jul 2003 11:38:45 -0700
| Lines: 87
| Message-ID: <01****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300| Thread-Index: AcNSEtCmGhmPnX8ZQxeVikG/sDAnmg==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102328| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| >your side? If so, you may want to show me the code
| snippet on your side so
| >that I can test it. Thanks.
|
| Lewis, tried your code, but I'm working in VB and
| couldn't remember half of how to get things set up for C| (#?). I do have a similar table working just find
| further up in the web page. It's not part of a datagrid| though. Below is the relevant code for this problem.
|
| Protected WithEvents CaseNumberSortButton As LinkButton =| LinkButton
| Protected WithEvents CaseNumberFilterBox As TextBox = New| TextBox
| Protected WithEvents CaseNumberHeaderTable As Table = New| Table
| Protected WithEvents CaseNumberHRow1 As TableRow = New
| TableRow
| Protected WithEvents CaseNumberHRow2 As TableRow = New
| TableRow
| Protected WithEvents CaseNumberHCell1 As TableCell = New| TableCell
| Protected WithEvents CaseNumberHCell2 As TableCell = New| TableCell
|
| Private Sub Page_Load(ByVal sender As System.Object,
| ByVal e As System.EventArgs) Handles MyBase.Load
| Call setCaseNumberHeaderTable()
| End Sub
|
| Public Sub setCaseNumberHeaderTable()
| With CaseNumberSortButton
| .ID = "CaseNumberSortButton"
| .Text = "Sort CaseNo"
| .ToolTip = "Click to sort the case number column"
| End With
| With CaseNumberFilterBox
| .ID = "CaseNumberFilterBox"
| .ToolTip = "Enter case number on which to filter
| records"
| End With
| With Me.CaseNumberHCell1
| .VerticalAlign = VerticalAlign.Bottom
| .HorizontalAlign = HorizontalAlign.Center
| .Controls.Add(CaseNumberSortButton)
| End With
| With CaseNumberHCell2
| .VerticalAlign = VerticalAlign.Top
| .Text = "Filter by: <BR><HR><BR>"
| .Controls.Add(CaseNumberFilterBox)
| End With
| With Me.CaseNumberHRow1
| .Controls.Add(CaseNumberHCell1)
| End With
| With CaseNumberHRow2
| .Controls.Add(CaseNumberHCell2)
| End With
| With CaseNumberHeaderTable
| .Controls.Add(CaseNumberHRow1)
| .Controls.Add(CaseNumberHRow2)
| .ID = "CaseNumberHeaderTable"
| .Width.Percentage(100)
| End With
| End Sub
|
| .aspx file:
|
| <asp:datagrid id=DG runat="server">
| <Columns>
| <asp:TemplateColumn SortExpression="CaseNo">
| <HeaderTemplate>
| <asp:Table ID="CaseNumberHeaderTable"
| Runat="Server" />
| </HeaderTemplate>
| ......
| </asp:TemplateColumn>
| </Columns>
| </asp:Datagrid>
|
| Any help appreciated...
|
| Sue
|
|
|
|
|
|

.

Jul 19 '05 #4
Hi Sue,

The Type should be the same as control's type <asp:Table
ID="CaseNumberHeaderTable" Runat="Server" />. Otherwise, there will be an
error. If FindControl menthod returns nothing, there will also be an error.
You can use code similar to the following to perform the cast.

Private Sub DataGrid1_ItemDataBound(ByVal sender As System.Object, ByVal e
As System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound

If e.Item.ItemType = ListItemType.Header Then
Dim ctrl As Control =
e.Item.FindControl("CaseNumberHeaderTable")
If Not ctrl Is Nothing Then
CaseNumberHeaderTable = CType(ctrl, Table)
setCaseNumberHeaderTable()
End If
End If

End Sub

Please let know if it helps. Thanks.

Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Sue" <Su*@ojd.state.or.us>
| Sender: "Sue" <Su*@ojd.state.or.us>
| References: <#T**************@TK2MSFTNGP09.phx.gbl>
<Dy**************@cpmsftngxa06.phx.gbl>
<01****************************@phx.gbl>
<Ip**************@cpmsftngxa06.phx.gbl>
| Subject: RE: Adding webcontrols.table to aspx - not rendering
| Date: Mon, 28 Jul 2003 10:03:35 -0700
| Lines: 204
| Message-ID: <33****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNVKi7XO2W/Wc7XRJSgT85DFF8sFw==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102600
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| >If I misunderstood your concern, would you please
| provide more explanations
| >on your requirement? Thank you.
|
| This is exactly what I wish to do. I have tried the code
| below (modified for my object names) and got an invalid
| cast error message at the CType line. I know this is
| simple, I'm just not tripping onto the correct syntax
| <sigh>. I've tried various options for the CType without
| success. Any other ideas?
|
| tia,
| Sue
|
| >
| >Dim CaseNumberHeaderTable As Table
| >
| >Private Sub DataGrid1_ItemDataBound(ByVal sender As
| System.Object, ByVal e
| >As System.Web.UI.WebControls.DataGridItemEventArgs)
| Handles
| >DataGrid1.ItemDataBound
| > If e.Item.ItemType = ListItemType.Header Then
| > CaseNumberHeaderTable =
| >CType(e.Item.FindControl("CaseNumberHeaderTable") , Table)
| > setCaseNumberHeaderTable()
| > End If
| >
| > End Sub
| >
| >Private Sub setCaseNumberHeaderTable()
| >
| > Dim CaseNumberHRow1 As TableRow = New TableRow
| > Dim CaseNumberHRow2 As TableRow = New TableRow
| > Dim CaseNumberHCell1 As TableCell = New TableCell
| > Dim CaseNumberHCell2 As TableCell = New TableCell
| >
| > Dim CaseNumberSortButton As LinkButton = New
| LinkButton
| > Dim CaseNumberFilterBox As TextBox = New TextBox
| >
| > CaseNumberSortButton.ID = "CaseNumberSortButton"
| > CaseNumberSortButton.Text = "Sort CaseNo"
| > CaseNumberSortButton.ToolTip = "Click to sort
| the case number
| >column"
| >
| > CaseNumberFilterBox.ID = "CaseNumberFilterBox"
| > CaseNumberFilterBox.ToolTip = "Enter case number
| on which to filter
| >records"
| >
| > CaseNumberHCell1.VerticalAlign =
| VerticalAlign.Bottom
| > CaseNumberHCell1.HorizontalAlign =
| HorizontalAlign.Center
| > CaseNumberHCell1.Controls.Add
| (CaseNumberSortButton)
| >
| > CaseNumberHCell2.VerticalAlign =
| VerticalAlign.Top
| > CaseNumberHCell2.Text = "Filter by: <BR><HR><BR>"
| > CaseNumberHCell2.Controls.Add
| (CaseNumberFilterBox)
| > CaseNumberHRow1.Controls.Add(CaseNumberHCell1)
| > CaseNumberHRow2.Controls.Add(CaseNumberHCell2)
| > CaseNumberHeaderTable.Controls.Add
| (CaseNumberHRow1)
| > CaseNumberHeaderTable.Controls.Add
| (CaseNumberHRow2)
| > CaseNumberHeaderTable.ID
| = "CaseNumberHeaderTable"
| > CaseNumberHeaderTable.BorderColor = Color.Blue
| > End Sub
| >
| >
| >Lewis Wang
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Sue" <Su*@ojd.state.or.us>
| >| Sender: "Sue" <Su*@ojd.state.or.us>
| >| References: <#T**************@TK2MSFTNGP09.phx.gbl>
| ><Dy**************@cpmsftngxa06.phx.gbl>
| >| Subject: RE: Adding webcontrols.table to aspx - not
| rendering
| >| Date: Thu, 24 Jul 2003 11:38:45 -0700
| >| Lines: 87
| >| Message-ID: <01****************************@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE
| V5.50.4910.0300
| >| Thread-Index: AcNSEtCmGhmPnX8ZQxeVikG/sDAnmg==
| >| Newsgroups: microsoft.public.dotnet.general
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.general:102328
| >| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| >| X-Tomcat-NG: microsoft.public.dotnet.general
| >|
| >| >your side? If so, you may want to show me the code
| >| snippet on your side so
| >| >that I can test it. Thanks.
| >|
| >| Lewis, tried your code, but I'm working in VB and
| >| couldn't remember half of how to get things set up for
| C
| >| (#?). I do have a similar table working just find
| >| further up in the web page. It's not part of a
| datagrid
| >| though. Below is the relevant code for this problem.
| >|
| >| Protected WithEvents CaseNumberSortButton As
| LinkButton =
| >| LinkButton
| >| Protected WithEvents CaseNumberFilterBox As TextBox =
| New
| >| TextBox
| >| Protected WithEvents CaseNumberHeaderTable As Table =
| New
| >| Table
| >| Protected WithEvents CaseNumberHRow1 As TableRow = New
| >| TableRow
| >| Protected WithEvents CaseNumberHRow2 As TableRow = New
| >| TableRow
| >| Protected WithEvents CaseNumberHCell1 As TableCell =
| New
| >| TableCell
| >| Protected WithEvents CaseNumberHCell2 As TableCell =
| New
| >| TableCell
| >|
| >| Private Sub Page_Load(ByVal sender As System.Object,
| >| ByVal e As System.EventArgs) Handles MyBase.Load
| >| Call setCaseNumberHeaderTable()
| >| End Sub
| >|
| >| Public Sub setCaseNumberHeaderTable()
| >| With CaseNumberSortButton
| >| .ID = "CaseNumberSortButton"
| >| .Text = "Sort CaseNo"
| >| .ToolTip = "Click to sort the case number column"
| >| End With
| >| With CaseNumberFilterBox
| >| .ID = "CaseNumberFilterBox"
| >| .ToolTip = "Enter case number on which to filter
| >| records"
| >| End With
| >| With Me.CaseNumberHCell1
| >| .VerticalAlign = VerticalAlign.Bottom
| >| .HorizontalAlign = HorizontalAlign.Center
| >| .Controls.Add(CaseNumberSortButton)
| >| End With
| >| With CaseNumberHCell2
| >| .VerticalAlign = VerticalAlign.Top
| >| .Text = "Filter by: <BR><HR><BR>"
| >| .Controls.Add(CaseNumberFilterBox)
| >| End With
| >| With Me.CaseNumberHRow1
| >| .Controls.Add(CaseNumberHCell1)
| >| End With
| >| With CaseNumberHRow2
| >| .Controls.Add(CaseNumberHCell2)
| >| End With
| >| With CaseNumberHeaderTable
| >| .Controls.Add(CaseNumberHRow1)
| >| .Controls.Add(CaseNumberHRow2)
| >| .ID = "CaseNumberHeaderTable"
| >| .Width.Percentage(100)
| >| End With
| >| End Sub
| >|
| >| .aspx file:
| >|
| >| <asp:datagrid id=DG runat="server">
| >| <Columns>
| >| <asp:TemplateColumn SortExpression="CaseNo">
| >| <HeaderTemplate>
| >| <asp:Table ID="CaseNumberHeaderTable"
| >| Runat="Server" />
| >| </HeaderTemplate>
| >| ......
| >| </asp:TemplateColumn>
| >| </Columns>
| >| </asp:Datagrid>
| >|
| >| Any help appreciated...
| >|
| >| Sue
| >|
| >|
| >|
| >|
| >|
| >|
| >
| >.
| >
|

Jul 19 '05 #5
Hi Sue,

I am glad to hear it. Thanks very much for participating the community.

Lewis

--------------------
| Content-Class: urn:content-classes:message
| From: "Sue" <Su*@ojd.state.or.us>
| Sender: "Sue" <Su*@ojd.state.or.us>
| References: <#T**************@TK2MSFTNGP09.phx.gbl>
<Dy**************@cpmsftngxa06.phx.gbl>
<01****************************@phx.gbl>
<Ip**************@cpmsftngxa06.phx.gbl>
<33****************************@phx.gbl>
<CF**************@cpmsftngxa06.phx.gbl>
| Subject: RE: Adding webcontrols.table to aspx - not rendering
| Date: Tue, 29 Jul 2003 08:41:29 -0700
| Lines: 12
| Message-ID: <00****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNV5+DwpsTgGSItQI60DEU5KS6ZWw==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102714
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Aha...in my HTML on the .aspx page, I had used
| <table...>. Once I changed it to <asp:table> things
| started working. Thanks for the help with this - I knew
| it was something simple that I just wasn't seeing. Live
| and learn.
|
| Sue
|
| >The Type should be the same as control's type <asp:Table
| >ID="CaseNumberHeaderTable" Runat="Server" />.
|
|
|

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: martin | last post by:
Hi, I am using vb.net and visual studio 2003. I have dragged a table webcontrol onto the designer server and configured a few columns and cells in the editor for the table control. Next I...
3
by: DalePres | last post by:
I have an application that uses the Microsoft.Web.UI.WebControls.TabStrip and Multipage controls. When I test the app on my pc or on my client's development web servers the controls render...
0
by: Mike James via .NET 247 | last post by:
Hi, I am using a WebControls.Table called MYTABLE on my asp.net page.I follow the methods to fill a WebControls.Table as outlined...
13
by: Sue | last post by:
On code-behind page: (attributes set programatically for each of these elements) linkbutton added to tablecell textbox added to tablecell tablecells added to tablerow tablerow added to table...
10
by: B. Chernick | last post by:
I am using a System.Web.UI.WebControls.Table control on a screen. (Dot Net 1.1) My problem is this: The table is programmatically reconstructed on every postback. Each table row contains two...
2
by: XD | last post by:
How to bind web.UI.webcontrols.Table in asp.net 2.0 to a DataView1? Please provide an example. Thanks, ___________________________________________________ NOTE...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.