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

HyperLinkColumn in a DataGrid

Hello,

I have a HyperLinkColumn in a DataGrid found in a Summary page.

When the link is clicked on, I want to get the data for all fields in the
database for that record and display this data on a Details page that does
not display the data in a DataGrid but instead displays it in a series of
databound label controls.

Is this possible or do I need to display the data on my Details page in a
DataGrid?

Thanks for any pointers.

-glenn
Jun 13 '06 #1
2 1376
This is very possible. You need to provide the ID for each row to the
hyperlink. You can do this in the onItemDataBound event of your
datagrid, using the FindControl() function to get the link for each
row, and then add a querystring parameter to the link. You could also
do this in the HTML view, by modifying the DataBinder.Eval syntax.

Then on your destinatino page, just grab the querystring parameter, and
display whatever data you want.

the alternative would be to use something like a LinkButton, and then
either redirect as above, or also you could stay on the same page, but
hide the datagrid and show your labels.
glenn wrote:
Hello,

I have a HyperLinkColumn in a DataGrid found in a Summary page.

When the link is clicked on, I want to get the data for all fields in the
database for that record and display this data on a Details page that does
not display the data in a DataGrid but instead displays it in a series of
databound label controls.

Is this possible or do I need to display the data on my Details page in a
DataGrid?

Thanks for any pointers.

-glenn


Jun 13 '06 #2
Jason,

Could you point me to any sample code that might illustrate how to do what
you have described?

-Glenn

"Jason Coyne" wrote:
This is very possible. You need to provide the ID for each row to the
hyperlink. You can do this in the onItemDataBound event of your
datagrid, using the FindControl() function to get the link for each
row, and then add a querystring parameter to the link. You could also
do this in the HTML view, by modifying the DataBinder.Eval syntax.

Then on your destinatino page, just grab the querystring parameter, and
display whatever data you want.

the alternative would be to use something like a LinkButton, and then
either redirect as above, or also you could stay on the same page, but
hide the datagrid and show your labels.
glenn wrote:
Hello,

I have a HyperLinkColumn in a DataGrid found in a Summary page.

When the link is clicked on, I want to get the data for all fields in the
database for that record and display this data on a Details page that does
not display the data in a DataGrid but instead displays it in a series of
databound label controls.

Is this possible or do I need to display the data on my Details page in a
DataGrid?

Thanks for any pointers.

-glenn


Jun 13 '06 #3

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

Similar topics

0
by: Jongmin | last post by:
Hi! I am making HyperLinkColumn in datagrid. It is simple to make the hyerlinkcolumn with one datafield. <asp:HyperLinkColumn Text="NAME" DataNavigateUrlField="NAME"...
3
by: SStory | last post by:
I have a style sheet for my site. It has various classes in it. It has <A: styles defined for all anchor tags. I have a datagrid in ASP.NET with a stylesheet linked to the page. It defines...
3
by: Morten | last post by:
Hi. After a while I finaly discovered how to use HyperLinkColumns. What I can't find is how to send mote than one "value" like page.aspx?id1&id2!!! <asp:HyperLinkColumn...
0
by: Atif Jalal | last post by:
I am using a Datagrid control and one of its column is a 'HyperLinkColumn'. The link text for this HyperLinkColumn is sometimes beyond 100 characters. I would like to display the link on multi-line...
1
by: Dave | last post by:
I have a hyperlink column in a datagrid as follows <asp:HyperLinkColumn DataNavigateUrlField="OrderId" DataNavigateUrlFormatString="OrderDetails.aspx?Id={0}" DataTextField="Order"...
1
by: Rob Meade | last post by:
Hi all, I have just added a hyperlink column to my datagrid - however I am having some troubles getting it to behave as I would like... My objective is to have a hyperlink that I can click on...
10
by: tshad | last post by:
I have a Datagrid with a column: <asp:HyperLinkColumn DataTextField="JobTitle" DataNavigateUrlField="PositionID" DataNavigateUrlFormatString="AddNewPositions.aspx?PositionID={0}"...
1
by: Roy | last post by:
I'm assuming this is amazingly simple and I'm just missing the boat. On the html side of an asp.net page I have a datagrid, a "search" button, and 8 text boxes for search criteria. A user enters...
1
by: Craig | last post by:
I have a datagrid with a couple of columns. Right now, I'm setting assigning the dataview to the datasource. For the HyperLinkColumn.... <asp:HyperLinkColumn...
4
by: rcoco | last post by:
Hi all, I have this big problem with hyperlinks I would appriciate any help please. My web site has two datagrids on the same page. And one has a list of names of the users which are in a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.