I would like my grid view to display only 3 rows any ideas on how I can achieve this?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Enable Paging and set the GridView’s
PageSizeto 3.How to: Enable Default Paging in the GridView Web Server Control
If you want to restrict your GridView to show only 3 rows without paging, you need to use a
DataSourcewith only 3 records (f.e. via SQL-TOP-Clause orLimitin MySQL or LINQ’sTake(3)).