Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
i want to show records in block format

the record should look like 3*8 table
can i use grid view to do so?

or is there any other way?
Posted
Updated 29-Dec-12 0:23am
v2
Comments
Orcun Iyigun 28-Dec-12 7:42am    
Yes you can use a gridview...
kishanthakar 29-Dec-12 1:08am    
i want to show records like below link

http://www.apollopharmacy.in/shop

can this be done with gridview?

1 solution

Yes, you can either use Gridview or Repeater.


Use DataList, with RepeatColumns
ASP.NET
<asp:DataList ID="DataList1" runat="server" RepeatColumns="4" RepeatDirection="Horizontal">
</asp:DataList>
 
Share this answer
 
v2
Comments
kishanthakar 29-Dec-12 1:08am    
i want to show records like below link

http://www.apollopharmacy.in/shop

can this be done with gridview?
[no name] 29-Dec-12 8:29am    
For this case, Use DataList instead. Its RepeatColumns property will allow you to set fixed integer value.
kishanthakar 2-Jan-13 5:26am    
Thank you sir

but how can do paging support in datalist

i have approx 500 records and i want to show only 18 products on page can we do it with data list?
[no name] 2-Jan-13 7:41am    
Try PageDataSource to apply paging in DataList. Google it, you will find a good tutorial.

follow the links below

http://www.c-sharpcorner.com/UploadFile/718fc8/paging-in-datalist-control/

http://stackoverflow.com/questions/9836830/how-to-set-paging-in-datalist-control-in-asp-net

http://www.codeproject.com/Articles/15567/Custom-Paging-for-DataList

http://forums.asp.net/t/1418412.aspx/1
kishanthakar 21-Feb-13 4:43am    
Thank you :-)

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900