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.
Private Sub dgPrinters_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgPrinters.ItemDataBound
If e.Item.ItemType <> ListItemType.Header And e.Item.ItemType <> ListItemType.Footer Then
'If Printer is in use then color the row Red
If e.Item.Cells(0).Text = "1" Then
e.Item.BackColor = System.Drawing.Color.Red
End If
End If
End Sub
<asp:TemplateColumn HeaderText="InUse"> <ItemTemplate>
<%# databinder.eval(container.dataitem, "InUse") %>
</ItemTemplate>
</asp:TemplateColumn>
void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
TableCell cell;
switch (e.Item.ItemType)
{
case ListItemType.Item:
case ListItemType.AlternatingItem:
foreach(System.Web.UI.Control control in e.Item.Controls)
{
cell = control as TableCell;
if (cell.Text == "3")
{
cell.BackColor = Color.FromName("red");
}
}
break;
}
}