Question for datagrid

G

Guest

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
 
G

Guest

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
 
E

Elton Wang

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
(e-mail address removed)
 
S

Steve Lutz

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
 
G

Guest

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["href"].toString()
if match is found then
previousURL=dv[i+1]["href"].ToString();

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

Manny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

datagrid 3
Tips for using Github??? 3
datagrid double click function 1
DataGrid Question 5
hyperlink column in datagrid in web user control 1
Datagrid Question 1
Datagrid 4
DataGrid, Hyperlink Column Question 3

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,192
Latest member
KalaReid2

Latest Threads

Top