Essential Studio for Asp.Net | Demos

SHOWCASE SAMPLES
Showcase samples
    Grid / Default
    <%@ Page Title="Grid-Default-ASP.NET-SYNCFUSION"   Language="C#" MetaDescription="This demo explains how to render grid view for tabular data using the Syncfusion ASP.NET Web Forms DataGrid control." AutoEventWireup="true" CodeBehind="DefaultFunctionalities.aspx.cs" MasterPageFile="~/Samplebrowser.Master" Inherits="WebSampleBrowser.Grid.DefaultFunctionalities" %>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="SampleHeading" runat="server">
        <link href="../Content/ejthemes/responsive-css/ejgrid.responsive.css" rel="stylesheet" />
        <span class="sampleName">Grid / Default</span>
    </asp:Content>
    
    <asp:Content ID="ControlContent" runat="server" ContentPlaceHolderID="ControlsSection">
        <div>
            <ej:Grid ID="FlatGrid" runat="server" AllowSorting="True" AllowPaging="True" IsResponsive="true">
                <Columns>
                    <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Right" Width="75" />
                    <ej:Column Field="CustomerID" HeaderText="Customer ID" Width="80" />
                    <ej:Column Field="EmployeeID" HeaderText="Employee ID" TextAlign="Right" Width="75" Priority="4" />
                    <ej:Column Field="Freight" HeaderText="Freight" TextAlign="Right" Width="75" Format="{0:C}" Priority="3" />
                    <ej:Column Field="OrderDate" HeaderText="Order Date" TextAlign="Right" Width="80" Format="{0:MM/dd/yyyy}" Priority="2" />
                    <ej:Column Field="ShipCity" HeaderText="Ship City" Width="110" Priority="2" />
                </Columns>
            </ej:Grid>
        </div>
    </asp:Content>
    
    
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Remoting.Messaging;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Syncfusion.JavaScript.Models;
    using Syncfusion.JavaScript.Web;
    
    namespace WebSampleBrowser.Grid
    {
        public partial class DefaultFunctionalities : System.Web.UI.Page
        {
            List<Orders> order = new List<Orders>();
            protected void Page_Load(object sender, EventArgs e)
            {
                BindDataSource();
            }
    
            private void BindDataSource()
            {
                int code = 10000;
                for (int i = 1; i < 10; i++)
                {
                    order.Add(new Orders(code + 1, "ALFKI", i + 0, 2.3 * i, new DateTime(1991, 05, 15), "Berlin"));
                    order.Add(new Orders(code + 2, "ANATR", i + 2, 3.3 * i, new DateTime(1990, 04, 04), "Madrid"));
                    order.Add(new Orders(code + 3, "ANTON", i + 1, 4.3 * i, new DateTime(1957, 11, 30), "Cholchester"));
                    order.Add(new Orders(code + 4, "BLONP", i + 3, 5.3 * i, new DateTime(1930, 10, 22), "Marseille"));
                    order.Add(new Orders(code + 5, "BOLID", i + 4, 6.3 * i, new DateTime(1953, 02, 18), "Tsawassen"));
                    code += 5;
                }
                this.FlatGrid.DataSource = order;
                this.FlatGrid.DataBind();
            }
    
            [Serializable]
            public class Orders
            {
                public Orders()
                {
    
                }
                public Orders(long OrderId, string CustomerId, int EmployeeId, double Freight, DateTime OrderDate, string ShipCity)
                {
                    this.OrderID = OrderId;
                    this.CustomerID = CustomerId;
                    this.EmployeeID = EmployeeId;
                    this.Freight = Freight;
                    this.OrderDate = OrderDate;
                    this.ShipCity = ShipCity;
                }
                public long OrderID { get; set; }
                public string CustomerID { get; set; }
                public int EmployeeID { get; set; }
                public double Freight { get; set; }
                public DateTime OrderDate { get; set; }
                public string ShipCity { get; set; }
            }
        }
    }