Hi,
In my datatable i insert 100 records. I want to select 10 per page and display the grid view. Anyone help... :)
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Abhishek KumarRank #510 · 4.8K reputationPosted May 27, 2014, 3:43 AM EDT
From database while selecting use row number.
Use below code to find the 10 record from the data table.
var Rows = dt.AsEnumerable().OrderBy(o=> o.Field
Later write a function to pass page number and get the 10 records to display for paging from gridview.
Hope this helps.
Anupam SinghRank #643 · 3.7K reputationPosted May 27, 2014, 4:19 AM EDT
you can specify pagesize="10" in your grid view.
hope it helps.
Khan Abrar AhmedRank #778 · 3K reputationPosted May 27, 2014, 8:42 AM EDT
http://www.c-sharpcorner.com/UploadFile/rohatash/gridview-paging-sample-in-Asp-Net/
http://www.codeproject.com/Articles/67520/GridView-Paging-and-Sorting
Munesh SharmaRank #174 · 13.9K reputationPosted May 27, 2014, 9:17 PM EDT
http://www.aspdotnet-suresh.com/2011/03/gridview-with-custom-paging.html
Renuga krishnan27 reputationPosted May 28, 2014, 2:34 AM EDT
Thanks. Now I got it. Now i have another problem. If u know plz help me.
Khan Abrar AhmedRank #778 · 3K reputationPosted May 28, 2014, 2:49 AM EDT
Munesh SharmaRank #174 · 13.9K reputationPosted May 28, 2014, 8:04 PM EDT