J
Jamie Sutherland
Hi,
Below is a piece of my code. What it does is displays datagrids on my
webpage. That part works ok it displays the data including the filtered. But
what it does is creates each table below one another. How do I get it to
either displayed next to each other (TABLE1 | TABLE2 | TABLE3) or Below one
another but with "<p></p>" tages in between each table .
Please help
Thanks
Jamie
Function CreateDataGrid(ByVal category As String)
' Create Row Filter for Categories
Dim dvCat As New DataView(ds.Tables("Links"))
dvCat.RowFilter = "Category='" & category & "'"
' Dynamically create the Datagrid
Dim dgLinks As New DataGrid
dgLinks.DataSource = dvCat
dgLinks.ItemStyle.BackColor = Color.AliceBlue
dgLinks.AlternatingItemStyle.BackColor = Color.Azure
dgLinks.Width = Unit.Pixel(200)
dgLinks.HeaderStyle.BackColor = Color.DarkBlue
dgLinks.HeaderStyle.ForeColor = Color.White
dgLinks.HeaderStyle.Font.Bold = True
' Set up the columns collection programatically, not Automatically
dgLinks.AutoGenerateColumns = False
' Add a hyperlink column
Dim hlc As New HyperLinkColumn
hlc.HeaderText = category
hlc.DataTextField = "Link_Title"
hlc.DataNavigateUrlField = "URL"
dgLinks.Columns.Add(hlc)
' Dynamically Add DataGrid into the Page
Page.Controls.Add(dgLinks)
dgLinks.DataBind()
End Function
Below is a piece of my code. What it does is displays datagrids on my
webpage. That part works ok it displays the data including the filtered. But
what it does is creates each table below one another. How do I get it to
either displayed next to each other (TABLE1 | TABLE2 | TABLE3) or Below one
another but with "<p></p>" tages in between each table .
Please help
Thanks
Jamie
Function CreateDataGrid(ByVal category As String)
' Create Row Filter for Categories
Dim dvCat As New DataView(ds.Tables("Links"))
dvCat.RowFilter = "Category='" & category & "'"
' Dynamically create the Datagrid
Dim dgLinks As New DataGrid
dgLinks.DataSource = dvCat
dgLinks.ItemStyle.BackColor = Color.AliceBlue
dgLinks.AlternatingItemStyle.BackColor = Color.Azure
dgLinks.Width = Unit.Pixel(200)
dgLinks.HeaderStyle.BackColor = Color.DarkBlue
dgLinks.HeaderStyle.ForeColor = Color.White
dgLinks.HeaderStyle.Font.Bold = True
' Set up the columns collection programatically, not Automatically
dgLinks.AutoGenerateColumns = False
' Add a hyperlink column
Dim hlc As New HyperLinkColumn
hlc.HeaderText = category
hlc.DataTextField = "Link_Title"
hlc.DataNavigateUrlField = "URL"
dgLinks.Columns.Add(hlc)
' Dynamically Add DataGrid into the Page
Page.Controls.Add(dgLinks)
dgLinks.DataBind()
End Function