aspnet-ej1-demos/Grid/ResizetoFit.aspx

23 строки
1.5 KiB
Plaintext

<%@ Page Title="Grid-Resize To Fit-ASP.NET-SYNCFUSION" Language="C#" MetaDescription="This demo explains how to fit the column width based on the size of the content or header cell text in Syncfusion ASP.NET Web Forms DataGrid control." AutoEventWireup="true" CodeBehind="ResizetoFit.aspx.cs" MasterPageFile="~/Samplebrowser.Master" Inherits="WebSampleBrowser.Grid.ResizetoFit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="SampleHeading" runat="server">
<span class="sampleName">Grid / Columns / Resize</span>
</asp:Content>
<asp:Content ID="ControlContent" runat="server" ContentPlaceHolderID="ControlsSection">
<div>
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" AllowResizeToFit="True">
<Columns>
<ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Right" Width="90" />
<ej:Column Field="CustomerID" HeaderText="Customer ID" Width="150" />
<ej:Column Field="EmployeeID" HeaderText="Employee ID" TextAlign="Right" Width="100" />
<ej:Column Field="OrderDate" HeaderText="Order Date" TextAlign="Right" Width="100" Format="{0:MM/dd/yyyy}" />
<ej:Column Field="Freight" HeaderText="Freight" TextAlign="Right" Format="{0:C}" />
<ej:Column Field="ShipName" HeaderText="Ship Name" Width="100" />
<ej:Column Field="ShipCity" HeaderText="Ship City" Width="100" />
</Columns>
</ej:Grid>
</div>
</asp:Content>