<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<div>
<ej:Grid ID="FlatGrid" runat="server" ClientIDMode="Static" AllowPaging="true" AllowGrouping="true" AllowFiltering="true" AllowSorting="true" >
<DataManager URL="Default.aspx/Data" Adaptor="WebMethodAdaptor" />
<ClientSideEvents Load="load" />
<Columns>
<ej:Column Field="CustomerID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Right" Width="75" />
<ej:Column Field="CompanyName" HeaderText="Customer ID" Width="80" />
<ej:Column Field="ContactName" HeaderText="Employee ID" TextAlign="Right" Width="75" />
</Columns>
<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True" ></EditSettings>
<ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel,search"></ToolbarSettings>
</ej:Grid>
</div>
</asp:Content>
………………………………………………………………………………………………………………
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static object Data(Syncfusion.JavaScript.DataManager value)
{
var DataSource = new NORTHWNDEntities7().C30000Records.ToList();
DataResult ds = new DataResult();
DataOperations obj = new DataOperations();
ds.result = obj.Execute(DataSource, value);
ds.count = DataSource.Count;
return ds;
}
|