<%@ Page Language="vb" AutoEventWireup="false" Inherits="Telerik.GridExamplesCSharp.Exporting.ExportToExcel.DefaultVB"CodeFile="DefaultVB.aspx.vb" %>
<%@ 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>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<div>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="Images/Excel_HTML.png"
OnClick="ImageButton_Click" AlternateText="Html" />
<asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="Images/Excel_ExcelML.png"
OnClick="ImageButton_Click" AlternateText="ExcelML" />
<asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="Images/Excel_BIFF.png"
OnClick="ImageButton_Click" AlternateText="Biff" />
<asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="Images/Excel_XLSX.png"
OnClick="ImageButton_Click" AlternateText="Xlsx" />
</div>
<div class="demo-container no-bg">
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AllowPaging="true"
PageSize="7" AutoGenerateColumns="false" OnExcelMLWorkBookCreated="RadGrid1_ExcelMLWorkBookCreated"
OnItemCreated="RadGrid1_ItemCreated" OnHTMLExporting="RadGrid1_HtmlExporting" OnItemCommand="RadGrid1_ItemCommand"
OnBiffExporting="RadGrid1_BiffExporting">
<ExportSettings>
<Excel WorksheetName="Employees" />
</ExportSettings>
<MasterTableView CommandItemDisplay="Top">
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
<Columns>
<telerik:GridBoundColumn DataField="EmployeeID" HeaderText="Employee ID" HeaderStyle-Width="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" HeaderStyle-Width="130px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" HeaderStyle-Width="130px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BirthDate" HeaderText="Birth Date" DataFormatString="{0:MM-dd-yy}"
HeaderStyle-Width="140px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="HireDate" HeaderText="Hire Date" DataFormatString="{0:MM/dd/yyyy}"
HeaderStyle-Width="140px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Address" HeaderText="Address" HeaderStyle-Width="240px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="City" HeaderText="City" HeaderStyle-Width="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Country" HeaderText="Country">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT * FROM [Employees]" runat="server"></asp:SqlDataSource>
<qsf:ConfiguratorPanel ID="ConfiguratorPanel1" runat="server">
<Views>
<qsf:View>
<ul class="fb-group">
<li>
<asp:CheckBox ID="CheckBox1" runat="server" Text="Ignore paging (exports all pages)"></asp:CheckBox>
</li>
<li>
<asp:CheckBox ID="CheckBox2" runat="server" Text="Apply Custom Styles"></asp:CheckBox>
</li>
<li>
<qsf:TextBox runat="server" ID="tbWorksheetName" EmptyMessage="Enter the name of the worksheet" Label="Worksheet name(Not Applicable to HTML format)"></qsf:TextBox>
</li>
<li>
<qsf:DropDownList runat="server" ID="AutoFitColumnWidthDropDown" Label="Column AutoFit mode (XLSX only)">
<Items>
<telerik:DropDownListItem Text="Disabled" />
<telerik:DropDownListItem Text="AutoFitExpandOnly" />
<telerik:DropDownListItem Text="AutoFitAll" />
<telerik:DropDownListItem Text="ExpandToFitNumberValuesWidth" />
</Items>
</qsf:DropDownList>
</li>
</ul>
</qsf:View>
</Views>
</qsf:ConfiguratorPanel>
</form>
</body>
</html>