Click here to Skip to main content
Rate this: bad
good
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 at 18-Oct-10 3:37am
   
Good Answer
Brij at 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 at 18-Oct-10 2:17am
   
That's why it's called a LIST view... you want GridView.
amit.aanmol at 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
0 Sergey Alexandrovich Kryukov 8,438
1 OriginalGriff 6,491
2 Peter Leow 3,567
3 Zoltán Zörgő 3,326
4 Richard MacCutchan 2,397


Advertise | Privacy | Mobile
Web04 | 2.8.150123.1 | Last Updated 29 Dec 2011
Copyright © CodeProject, 1999-2015
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