V
vpravin
Hi guys...i am a super noob with html and aspx..
i didnt start this project but i am modifying it...
q: how do i change the width of a column:
Thats the table which is within a text box
<asp:Table id="regulatoryDetails" runat="server" Font-Size="X-Small"
Width="400px" Height="8px"
CellPadding="0" CellSpacing="0" CssClass="regular"
HorizontalAlign="Center"></asp:Table></P>
</aspanel><aspanel id="Panel4" style="Z-INDEX: 103; LEFT: 16px;
POSITION: absolute; TOP: 16px" runat="server"
CssClass="regular" BorderWidth="1px" BorderStyle="Solid"
BorderColor="#463E41" Height="176px" Width="404px"
Font-Size="X-Small">
<P>
...
i went to the FAQ of this forum and saw the post about changingf
column widths...
it sent me to a KB article which asked me to do this:
Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
e.Item.Cells(0).Width = New Unit(264)
e.Item.Cells(1).Width = New Unit(264)
End Sub
....now my q is..when i call teh function..what do i put in
DataGrid1_ItemCreated(tablename, ???)
....
This is the code at the start of the program
Protected WithEvents serviceProviders As
System.Web.UI.WebControls.Table
Protected WithEvents strategyAndStyles As
System.Web.UI.WebControls.Table
Protected WithEvents details As System.Web.UI.WebControls.Table
........
thats how i add cells to the table
Dim titleCell As New TableCell, valueCell As New TableCell
titleCell.Text = strategies
titleCell.CssClass = "regular"
valueCell.Text = style
valueCell.CssClass = "regular"
'if a sort column is specified for and of the column, add the 'sorted'
css class laso to that column
If Me.regulatoryDetailsSortColumn = "Strategy" Then
titleCell.CssClass = titleCell.CssClass & " " & "sorted"
ElseIf Me.regulatoryDetailsSortColumn = "Style" Then
valueCell.CssClass = valueCell.CssClass & " " & "sorted"
End If
'create the rows for the cells created and add the rows to the
regylatory details table
Dim r As New TableRow
r.Cells.Add(titleCell)
r.Cells.Add(valueCell)
Me.strategyAndStyles.Rows.Add(r)
NOTE>...I DONT HAVE A DATAGRID in the table...
just a panel; and a table inside it..
and i add rows to it
i didnt start this project but i am modifying it...
q: how do i change the width of a column:
Thats the table which is within a text box
<asp:Table id="regulatoryDetails" runat="server" Font-Size="X-Small"
Width="400px" Height="8px"
CellPadding="0" CellSpacing="0" CssClass="regular"
HorizontalAlign="Center"></asp:Table></P>
</aspanel><aspanel id="Panel4" style="Z-INDEX: 103; LEFT: 16px;
POSITION: absolute; TOP: 16px" runat="server"
CssClass="regular" BorderWidth="1px" BorderStyle="Solid"
BorderColor="#463E41" Height="176px" Width="404px"
Font-Size="X-Small">
<P>
...
i went to the FAQ of this forum and saw the post about changingf
column widths...
it sent me to a KB article which asked me to do this:
Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
e.Item.Cells(0).Width = New Unit(264)
e.Item.Cells(1).Width = New Unit(264)
End Sub
....now my q is..when i call teh function..what do i put in
DataGrid1_ItemCreated(tablename, ???)
....
This is the code at the start of the program
Protected WithEvents serviceProviders As
System.Web.UI.WebControls.Table
Protected WithEvents strategyAndStyles As
System.Web.UI.WebControls.Table
Protected WithEvents details As System.Web.UI.WebControls.Table
........
thats how i add cells to the table
Dim titleCell As New TableCell, valueCell As New TableCell
titleCell.Text = strategies
titleCell.CssClass = "regular"
valueCell.Text = style
valueCell.CssClass = "regular"
'if a sort column is specified for and of the column, add the 'sorted'
css class laso to that column
If Me.regulatoryDetailsSortColumn = "Strategy" Then
titleCell.CssClass = titleCell.CssClass & " " & "sorted"
ElseIf Me.regulatoryDetailsSortColumn = "Style" Then
valueCell.CssClass = valueCell.CssClass & " " & "sorted"
End If
'create the rows for the cells created and add the rows to the
regylatory details table
Dim r As New TableRow
r.Cells.Add(titleCell)
r.Cells.Add(valueCell)
Me.strategyAndStyles.Rows.Add(r)
NOTE>...I DONT HAVE A DATAGRID in the table...
just a panel; and a table inside it..
and i add rows to it