<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Trace="false"
    Inherits="_Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    
    <style type="text/css">
    
    .class1
    {
    display:none;
    }
    
    </style>
    
</head>
<body>
    <form id="form1" runat="server">

        <script type="text/javascript">
    
    function GridCreated(sender, eventArgs)
    {    
    var cells = document.getElementsByTagName("tr");
     
        for(var i=0; i<cells.length; i++)
        {
            if(window.navigator.appName=="Microsoft Internet Explorer")
            {
            cells[i].childNodes[0].className="class1";
            }
            else
            {
            cells[i].childNodes[1].className="class1";
            }
        }
    
    }
    
        </script>

        <asp:ScriptManager runat="server" ID="ScriptManager1">
        </asp:ScriptManager>
        &nbsp;&nbsp;&nbsp;<br />
        <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Hay" AutoGenerateColumns="False"
            GridLines="None" DataSourceID="AccessDataSource1" OnPreRender="RadGrid1_PreRender1" 
            OnColumnCreated="RadGrid1_ColumnCreated" OnItemDataBound="RadGrid1_ItemDataBound">
            <MasterTableView DataKeyNames="CustomerID" DataSourceID="AccessDataSource1">
            
            <GroupByExpressions>
            <telerik:GridGroupByExpression>
            <GroupByFields>          
            <telerik:GridGroupByField FieldName="CustomerID" />  
            </GroupByFields>
            <SelectFields>
            <telerik:GridGroupByField FieldName="CustomerID" />
            </SelectFields>
            </telerik:GridGroupByExpression>
            </GroupByExpressions>
            
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <EditFormSettings>
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
                <Columns>
                    <telerik:GridEditCommandColumn>
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True"
                        SortExpression="CustomerID" UniqueName="CustomerID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName"
                        UniqueName="CompanyName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName"
                        UniqueName="ContactName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle"
                        UniqueName="ContactTitle">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                        UniqueName="Address">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn UniqueName="TemplateColumn">
                        <ItemTemplate>
                            <itemtemplate>
                                <asp:Label ID="Label2" Text='<%# Eval("CustomerID") %>' runat="server"></asp:Label>
                                <asp:HiddenField ID="hdnLenderNumber" Value='<%# Eval("CompanyName") %>' runat="server" />
                                <asp:HiddenField ID="hdnOrgNumber" Value='<%# Eval("ContactName") %>' runat="server" />
                                <asp:HiddenField ID="HiddenField1" Value='<%# Eval("ContactTitle") %>' runat="server" />
                            </itemtemplate>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
                <ClientEvents OnGridCreated="GridCreated" />
                <Resizing AllowColumnResize="true" />
            </ClientSettings>
        </telerik:RadGrid><asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb"
            SelectCommand="SELECT TOP 10 [CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address] FROM [Customers]">
        </asp:AccessDataSource>
    </form>
</body>
</html>
