Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
e.Item.Cells(0).Style.Item("TEXT-ALIGN") = "CENTER"
Private Sub dgBudget_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgBudget.ItemDataBound
Dim lit As ListItemType
lit = e.Item.ItemType
For c As Integer = 1 To e.Item.Cells.Count - 1
If lit = ListItemType.AlternatingItem Or lit = ListItemType.Item Then
e.Item.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Item.Cells(0).Width = System.Web.UI.WebControls.Unit.Pixel(230)
e.Item.Cells(c).HorizontalAlign = HorizontalAlign.Right
e.Item.Cells(c).Width = System.Web.UI.WebControls.Unit.Pixel(95)
e.Item.Cells(c).Text = String.Format("{0:N}", CDec(e.Item.DataItem(c)))
ElseIf lit = ListItemType.Header Then
e.Item.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Item.Cells(0).Width = System.Web.UI.WebControls.Unit.Pixel(230)
e.Item.Cells(c).HorizontalAlign = HorizontalAlign.Right
e.Item.Cells(c).Width = System.Web.UI.WebControls.Unit.Pixel(95)
ElseIf lit = ListItemType.Footer Then
e.Item.Cells(0).Text = "** Budget Totals **"
e.Item.Cells(c).HorizontalAlign = HorizontalAlign.Right
e.Item.Cells(0).Width = System.Web.UI.WebControls.Unit.Pixel(230)
e.Item.Cells(c).Width = System.Web.UI.WebControls.Unit.Pixel(95)
End If
Next
End Sub
<asp:BoundColumn DataField="winner" HeaderText="Win">
<HeaderStyle Font-Size="11px" Font-Names="Verdana" Font-Bold="True" HorizontalAlign="Center"></HeaderStyle>
<ItemStyle Font-Size="11px" Font-Names="Verdana" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
</asp:BoundColumn>