We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Web forms Grid bound to sql very slow

Hi, i'm evaluating your products, in particular the grid for asp.net webforms.
It seems to be working ok, but when i bind it to a sqldatasource, with just 19000 record, the grid performs really slow. At the page load it freezes for almost a minute, and every subsequent operation (filtering, sorting, grouping) is really really slow.

Is there anyway to overcome this? otherwise unfortunately it's unusable.

Thanks

1 Reply

JK Jayaprakash Kamaraj Syncfusion Team December 9, 2015 11:37 AM UTC

Hi Dario,
We have analyzed your requirement. If you are use 19,000 records in sqldatabase with DataOperation (filtering, searching, grouping, sorting), we suggest that you use the WebmethodAdaptor. The WebMethod adaptor works on the basis of load on demand. You have to do the done DataOperations (filtering, searching, grouping, sorting) by using the DataOperations Execute method in the WebMethodAdaptor. Please refer to the below code Example and Sample.
Code Example:

<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;


        }

 
Sample: http://www.syncfusion.com/downloads/support/forum/121379/ze/Sample-1225641300
We have already created a knowledge base for the server side operations. You can find the documentation in the following link:
http://www.syncfusion.com/kb/4300/server-side-api-for-datamanager-operations

Regards,

Jayaprakash K.



Loader.
Up arrow icon