<%@ Page Language="c#" Inherits="Telerik.GridExamplesCSharp.Exporting.ExportToWordCSV.DefaultCS"CodeFile="DefaultCS.aspx.cs" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
<link rel="Stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<script type="text/javascript" src="scripts.js"></script>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" PostBackControls="ImageButton1,ImageButton2,ImageButton3" CssClass="demo-container no-bg">
<asp:ImageButton ID="ImageButton1" ImageUrl="images/file-extension-doc-icon_bigger.png"
OnClick="Button1_Click" runat="server" CssClass="ImageButtons" />
<asp:ImageButton ID="ImageButton3" ImageUrl="images/file-extension-docx-icon_bigger.png"
OnClick="ImageButton3_Click" runat="server" CssClass="ImageButtons" />
<asp:ImageButton ID="ImageButton2" ImageUrl="images/file-extension-csv-icon_bigger.png"
OnClick="Button2_Click" runat="server" CssClass="ImageButtons" />
<br />
<br />
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" DataSourceID="SqlDataSource1" AllowSorting="True" Skin="Silk"
AutoGenerateColumns="false" AllowPaging="True" PageSize="10" runat="server" OnItemCommand="RadGrid1_ItemCommand">
<ExportSettings HideStructureColumns="true">
</ExportSettings>
<MasterTableView Width="100%" CommandItemDisplay="Top">
<CommandItemSettings ShowExportToWordButton="true" ShowExportToCsvButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
<PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
<Columns>
<telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID">
<HeaderStyle BackColor="#8EDDFF" Font-Bold="true" />
<ItemStyle BackColor="#B2F4FF" Font-Italic="true" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CompanyName" HeaderText="Company Name">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ContactName" HeaderText="Contact Name">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ContactTitle" HeaderText="Contact Title">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Address" HeaderText="Address">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PostalCode" HeaderText="Postal Code">
</telerik:GridBoundColumn>
</Columns>
<ItemStyle BackColor="#DFDFDF" />
<HeaderStyle BackColor="#FFFFFF" ForeColor="#767676" />
<AlternatingItemStyle BackColor="#FFFFFF" />
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
<qsf:ConfiguratorPanel ID="ConfiguratorPanel2" runat="server">
<Views>
<qsf:View>
<ul class="fb-group">
<li>
<span class="checkbox">
<asp:CheckBox ID="CheckBox1" Text="Export only data" runat="server"></asp:CheckBox></span>
</li>
<li>
<span class="checkbox">
<asp:CheckBox ID="CheckBox2" Text="Ignore paging (exports all pages)" runat="server"></asp:CheckBox></span>
</li>
<li>
<span class="checkbox">
<asp:CheckBox ID="CheckBox3" Text="Open exported data in new browser window" runat="server"></asp:CheckBox></span>
</li>
<li>
<span class="checkbox">
<asp:CheckBox ID="CheckBox4" Text="Use item styles (Word doc-only)" runat="server"></asp:CheckBox></span>
</li>
</ul>
</qsf:View>
</Views>
</qsf:ConfiguratorPanel>
<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers"
runat="server"></asp:SqlDataSource>
</form>
</body>
</html>