Click here to Skip to main content
12,063,909 members (65,507 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
I bind data source to list view control and want to display one row at a time. How is it possible, I have all ready set GroupItemCount property to 1, but list view displaying all the rows one by one in list..
Posted 17-Oct-10 20:41pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

GroupItemCount property is for setting the number of Items per Group. If you want to show only one item, you just bind one item to gridview or you can go for paging with displaying one item at a time.
  Permalink  
Comments
Dalek Dave 18-Oct-10 3:37am
   
Good Answer
Brij 18-Oct-10 8:53am
   
Thanks Dalek.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Try GridView paging (and set PageSize = 1) Smile | :)
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

I am working with ListView not GridView. I am creating an online examination page and want to show one question with its options in ListView, and want to show another question on next button click. But, the ListView showing all rows one by one just like list.
  Permalink  
Comments
Nathan Staudt 18-Oct-10 2:17am
   
That's why it's called a LIST view... you want GridView.
amit.aanmol 18-Oct-10 2:45am
   
ok.. so i cant display only one record at a time in listview..
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

I know this is an old post but you can use the PageSize="1" to display 1 record at a time in ListView
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160204.4 | Last Updated 29 Dec 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100