<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ Register Assembly="Infragistics45.Web.v16.2, Version=16.2.20162.1023, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.GridControls" TagPrefix="ig" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <ig:WebDataGrid ID="WebDataGrid" runat="server" Height="350px" Width="400px">
                <ClientEvents Initialize="WebDataGrid_OnInitialize_ChangeColor" />
            </ig:WebDataGrid>
            <asp:ScriptManager runat="server"></asp:ScriptManager>
        </div>
    </form>
    <script type="text/javascript">
        function WebDataGrid_OnInitialize_ChangeColor(sender) {
            var rows = sender.get_rows();

            for (var i = 0; i < rows.get_length(); i++) {
                var row = rows.get_row(i),
                    cell = row.get_cellByColumnKey("Color"),
                    cellElement = cell.get_element();

                cellElement.style.border = "none";
                cellElement.style.background = cell.get_value();
                cellElement.style.color = "white";
            }
        }
    </script>
</body>
</html>
