<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" 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>
    <link href="TestSkin/Input.TestSkin.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadCodeBlock ID="rcb" runat="server">

            <script type="text/javascript">    
                  
                  
                  
                  function rowDeselecting(sender, args)
                  {
                  if(args.get_domEvent().target.nodeName=="TD")
                    {
                    args.set_cancel(true);
                    }                 
                  } 
             
            </script>

        </telerik:RadCodeBlock>
        <asp:ScriptManager runat="server" ID="ScriptManager1">
        </asp:ScriptManager>
        
        <asp:Button runat="server" ID="Button1" Text="Export" OnClick="Button1_Click" />
                
        <telerik:RadGrid ID="RadGrid1" Skin="WebBlue" DataSourceID="SqlDataSource1" runat="server"
         AllowMultiRowSelection="true"
            Width="95%" AutoGenerateColumns="False" PageSize="3" AllowSorting="True"
            AllowPaging="True" GridLines="None" ShowStatusBar="True" OnPreRender="RadGrid1_PreRender">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="CustomerID" AllowMultiColumnSorting="True"
                HierarchyLoadMode="Client" Width="100%">
                <Columns>
                
                <telerik:GridClientSelectColumn>
                </telerik:GridClientSelectColumn>
                
                    <telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton"
                        DataField="CustomerID" UniqueName="CustomerID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton"
                        DataField="ContactName" UniqueName="ContactName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton"
                        DataField="CompanyName" UniqueName="CompanyName">
                    </telerik:GridBoundColumn>
                </Columns>
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="CompanyName"></telerik:GridSortExpression>
                </SortExpressions>
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
            </MasterTableView>
            
            <ClientSettings>
            <ClientEvents OnRowDeselecting="rowDeselecting" />
            </ClientSettings>
            
            <FilterMenu EnableTheming="True" Skin="WebBlue">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </FilterMenu>
        </telerik:RadGrid>
        <asp:AccessDataSource ID="SqlDataSource1" DataFile="~/App_Data/Nwind.mdb" SelectCommand="SELECT * FROM Customers"
            runat="server"></asp:AccessDataSource>
    </form>
</body>
</html>
