473,420 Members | 1,547 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,420 software developers and data experts.

Question for datagrid

i have the following situatin: In datagrid i click on hyperlink button to
navigate to the detail.aspx page which displays detailed information
regarding item id passed from datagrid.
Can i put arrows(up/down) on detail.aspx so that i can retrieve
next/previous corresponding item in datagrid? Is this possible?
Can someone recomend any article which explains how to achieve this in C#?

Thanks

Manny
Nov 19 '05 #1
5 1361
Yes it is possible

Use Paging in the datagrid

"Manny Chohan" wrote:
i have the following situatin: In datagrid i click on hyperlink button to
navigate to the detail.aspx page which displays detailed information
regarding item id passed from datagrid.
Can i put arrows(up/down) on detail.aspx so that i can retrieve
next/previous corresponding item in datagrid? Is this possible?
Can someone recomend any article which explains how to achieve this in C#?

Thanks

Manny

Nov 19 '05 #2
hi Robin, Thanks for the reply however my question was a little different
from the paging function in datagrid itself. I have hyperlink button in each
row of datagrid clicking which i navigate user to detail.aspx page. I want to
put next/previous on the detail.aspx page not on the one tat has datagrid.

thanks

Manny

"Robin Chatterjee" wrote:
Yes it is possible

Use Paging in the datagrid

"Manny Chohan" wrote:
i have the following situatin: In datagrid i click on hyperlink button to
navigate to the detail.aspx page which displays detailed information
regarding item id passed from datagrid.
Can i put arrows(up/down) on detail.aspx so that i can retrieve
next/previous corresponding item in datagrid? Is this possible?
Can someone recomend any article which explains how to achieve this in C#?

Thanks

Manny

Nov 19 '05 #3
Hi Manny,

I think one way you can do is to save the Data source of
the datagrid, e.g. datatable, to session. Then in the
detail page, retrieve datatable from session and lookup
the corresponding item from the datatable.

Hope it's helpful to you.

Elton Wang
el********@hotmial.com

-----Original Message-----
i have the following situatin: In datagrid i click on hyperlink button tonavigate to the detail.aspx page which displays detailed informationregarding item id passed from datagrid.
Can i put arrows(up/down) on detail.aspx so that i can retrievenext/previous corresponding item in datagrid? Is this possible?Can someone recomend any article which explains how to achieve this in C#?
Thanks

Manny
.

Nov 19 '05 #4
Hi Manny,

I would save the contents (dataset I'm assuming) that the datagrid is using,
probably in the session. This way on the detail.aspx page, you can reference
the original dataset to determine the next/previous rows and supply links to
them.

Another way of doing it, depending on the data. If the data is sequencial,
for example, a numerical list of id's 1 to 10, then you could just assume
that on the detail page for item number 9, the "next" link goes to item 10,
and previous goes to 8. But I'm guessing your data isn't laid out like that.

HTH
Steve


"Manny Chohan" <Ma*********@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.com...
i have the following situatin: In datagrid i click on hyperlink button to
navigate to the detail.aspx page which displays detailed information
regarding item id passed from datagrid.
Can i put arrows(up/down) on detail.aspx so that i can retrieve
next/previous corresponding item in datagrid? Is this possible?
Can someone recomend any article which explains how to achieve this in C#?

Thanks

Manny

Nov 19 '05 #5
Thanks steve, this is exactly what i tried. the data in the dataset is not
sequential although used the if statement to verify the column value against
the querystring.
nextURL=dv[i]["href"].toString()
if match is found then
previousURL=dv[i+1]["href"].ToString();

Thanks everyone for the reply......Have a Happy New Year.

Manny

"Steve Lutz" wrote:
Hi Manny,

I would save the contents (dataset I'm assuming) that the datagrid is using,
probably in the session. This way on the detail.aspx page, you can reference
the original dataset to determine the next/previous rows and supply links to
them.

Another way of doing it, depending on the data. If the data is sequencial,
for example, a numerical list of id's 1 to 10, then you could just assume
that on the detail page for item number 9, the "next" link goes to item 10,
and previous goes to 8. But I'm guessing your data isn't laid out like that.

HTH
Steve


"Manny Chohan" <Ma*********@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.com...
i have the following situatin: In datagrid i click on hyperlink button to
navigate to the detail.aspx page which displays detailed information
regarding item id passed from datagrid.
Can i put arrows(up/down) on detail.aspx so that i can retrieve
next/previous corresponding item in datagrid? Is this possible?
Can someone recomend any article which explains how to achieve this in C#?

Thanks

Manny


Nov 19 '05 #6

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

Similar topics

5
by: AC | last post by:
Any reason i'm having trouble with: DataGrid1.Columns(7).ItemStyle.HorizontalAlign = HorizontalAlign.Right I'm trying to directly set the column alignment of a datagrid created at runtime.. ...
1
by: Moshfegh Hamedani | last post by:
Hi there, I found this question in Amit Kalani's preparation book for exam 70-15 (Developing Web Applications with C#). I think it's a very stupid question! It says the correct answer is A but...
0
by: Moshfegh Hamedani | last post by:
Hi there, I found this question in Amit Kalani's preparation book for exam 70-15 (Developing Web Applications with C#). I think it's a very stupid question! It says the correct answer is A but...
6
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP...
0
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? I’m trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box...
0
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? I’m trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box...
2
by: JohnR | last post by:
I have a question on bindingcontext, bindings, and controlbindingscollection. I understand the very basic idea, and I think I should be able to do this, but I'm not sure how. First problem: I...
1
by: amber | last post by:
I have a form, with multiple tabs. Each tab contains 1 datagrid except for the last tab which contains 2 datagrids. I have a toolbar that I use for the entire form. When the 'delete' button is...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.