Load Data to a DataGrid

Posted on 2004-10-25
Last Modified: 2012-05-05

I have 1 million records in a table and I need to display the data in the DataGrid using ASP.NET/C# Language. I have the Sql Server as my database. I need to display 20 records per page. What is the best or optimized solution for this ?
Question by:sen007
    LVL 28

    Expert Comment

    Hi sen007,

    look at this article :
    Very good article for paging

    LVL 17

    Expert Comment

    Alright the best solution here is to refine your business logic so you don't have 1 million records.  I mean surely your user won't look through 1 million records.  So fix the logic first then profile and test.

    LVL 20

    Expert Comment

    Using datagrid custom paging will make a significant improvement to loading speed of your page.
    LVL 20

    Accepted Solution

    And also these, better ones

    Creating a Stored Procedure for Custom Paging with the ASP.NET DataGrid Control

    Paging Datagrid output from the Database
    LVL 26

    Expert Comment

    as "AerosSaga" mentioned .. change ur business logic .. or change a user interface to show a filter screen whcih will filter the information to be shown in the datagrid ..

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: MongoDB Object-Document Mapper for NodeJS

    NodeJS (JavaScript on the server) is awesome, but some developers get confused about NoSQL when it comes to working in Node with MongoDB (NoSQL database). Do you need a better explanation of how to use Node.js with MongoDB? The most popular choice is the Mongoose library.

    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 ( But the ability to create custom scanning profiles a…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now