473,382 Members | 1,204 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

GridView2.0\DisplayRecordsVertically

gh
I am using .net 2.0 and have a gridview, with the pager set to 10
records per page. I had a data list setup that displayed the contents
of a record in one column. I wanted to be able to use a pager, to
control the number of records per page, so I copied the template over
to a gridview and pasted it into the gridview item template. When I run
the web app. it displays the first 10 records as expected, but when I
click on the pager to goto the next page or another, the pages are
empty. Also I the pager selection count displays 1 through 10 and if I
click the next arrow after 10, nothing happens. Is the gridview
supposed to work, when displaying records in a cell this way?

TIA
Sep 25 '08 #1
3 827
I had a data list setup that displayed the contents
of a record in one column.
Is your intention to display each record as a gridview column and record's
fields as gridview rows (as suggested by the title above)?

Sep 25 '08 #2
gh
Bogdan wrote:
>I had a data list setup that displayed the contents
of a record in one column.

Is your intention to display each record as a gridview column and record's
fields as gridview rows (as suggested by the title above)?
Bogdan:

I have a table(DataGrid), with one column, that displays each record as
a list. When the user clicks on the pager(next) the page refreshes with
the next 10 photos. I would like to display 4 rows across and 4 rows
down, with a pager. Each cell will contain an image, that is retrieved
by the url stored in a record. If the user clicks on the pager, to go
to the next set of records, then the datagrid will dislpay the next 16
images. I hope this explains

Thanks
Sep 25 '08 #3
>
I have a table(DataGrid), with one column, that displays each record as a
list. When the user clicks on the pager(next) the page refreshes with the
next 10 photos. I would like to display 4 rows across and 4 rows down,
with a pager. Each cell will contain an image, that is retrieved by the
url stored in a record. If the user clicks on the pager, to go to the
next set of records, then the datagrid will dislpay the next 16 images. I
hope this explains

Thanks
I think I get it now.

I can't see how you can utilize gridview and its paging capability without
going through some heavy customization. The default paging works with rows
but in your case there are no rows - just cells (not even columns).

If I were you I'd leave the gridview's default behaviour alone and modify
your object data source attached to the gridview so it supplies the info in
rows and columns. You could still read your images/urls as records from a
data store but you would pass them to the gridview as rows (i.e. 4 records
per row). If you do it in your code-behind (e.g. in your bll) then you have
a lot of flexibility.

Also, try to test the default gridview paging before you template it.
Simply enable the paging and make sure it works as expected first.

Finally, maybe the gridview is not the best choice in this case.

Bogdan
Sep 26 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bhawin13 | last post by:
Hello, I am not able to see any records in GridView2. GridView2 is not shown. I tried to print record count of datatable and it shows there is records but nothing is shown in gridview2. First I...
3
by: Marc Grutte | last post by:
Hi I am trying to bind a custom datasource to a gridview whilst paging is enabled. What is missing in this code to make the paging + binding work? thanks M <%@ Page Language="VB" %>
1
by: Nick C | last post by:
Hi I would like to insert a new row in this gridview but the showfooter=true is not working? thanks N <%@ Page Language="VB" %>
0
by: trint | last post by:
I hope I can explain this clearly enough to get help. I have three gridviews that need to work from each other to display like a java verticle menu (just in the way it appears). GridView1 is...
4
by: cmrhema | last post by:
Hi I want to insert a row in gridview using C# I do not want to connect using sqldatasource and input parameters( usually many of them code in UI part). But i DO NOT want that. i am supposed to do...
0
by: Fabrizio | last post by:
Hi all. I have a field in a gridview as templatefield which is a label in view mode and a dropdownlist in edit mode with his datasource. This gridview is inserted as templatefield in another...
6
by: hydson | last post by:
Hi, I have two gridviews to which data is binded when page is not posted back. when i run for first time the data is binded to gridview, and when i run next time the data is not binded to grid...
0
by: =?Utf-8?B?ZWdzZGFy?= | last post by:
Hi, I have created a second gridview when customer clicks on select link with this code: Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As...
12
by: dorandoran | last post by:
I followed this link to add new record from gridview. So far it's good but I need to modify the last piece to edit the record that I will supply the record id. ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.