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

Hyperlink in DataGrid

Hello!

I am using a DataGrid to show a table. Some of the columns are showing
numeric data. I need to show these numeric data as hyperlinks so that the
user can drill downward (or get more details about the data). Thanks in
advance.

Newbie
Nov 16 '05 #1
5 5883
Ben
Simply add a hyperlink column to the grid and bind your values to it instead
of a databound column.
"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
Hello!

I am using a DataGrid to show a table. Some of the columns are showing
numeric data. I need to show these numeric data as hyperlinks so that the
user can drill downward (or get more details about the data). Thanks in
advance.

Newbie


Nov 16 '05 #2
Newbie,

In order to do this, you will have to create your own column style that
derives from DataGridColumnStyle. Deriving from this class will allow you
to control how a column is rendered in the data grid. Once you do that, you
can assign it to your column, and create the semantics you are looking for.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
Hello!

I am using a DataGrid to show a table. Some of the columns are showing
numeric data. I need to show these numeric data as hyperlinks so that the
user can drill downward (or get more details about the data). Thanks in
advance.

Newbie

Nov 16 '05 #3
Thanks Ben. I am using 2 Panel controls in my webform. The first Panel
(containing a DataGrid) is visible at startup. When the user clicks on the
hyperlink in the DataGrid cell, the second Panel control becomes visible and
the first one becomes hidden. I am not using a different webform after the
hyperlink is clicked. How do I handle the clicking? Is there an event handler
I should implement? Suggestions?

"Ben" wrote:
Simply add a hyperlink column to the grid and bind your values to it instead
of a databound column.
"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
Hello!

I am using a DataGrid to show a table. Some of the columns are showing
numeric data. I need to show these numeric data as hyperlinks so that the
user can drill downward (or get more details about the data). Thanks in
advance.

Newbie


Nov 16 '05 #4
Ben
Add a link button and set the command name and args. Then wire up the
datagrids oncommand event and hide/show/bind at will :)

Ben
"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
Thanks Ben. I am using 2 Panel controls in my webform. The first Panel
(containing a DataGrid) is visible at startup. When the user clicks on the
hyperlink in the DataGrid cell, the second Panel control becomes visible
and
the first one becomes hidden. I am not using a different webform after the
hyperlink is clicked. How do I handle the clicking? Is there an event
handler
I should implement? Suggestions?

"Ben" wrote:
Simply add a hyperlink column to the grid and bind your values to it
instead
of a databound column.
"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
> Hello!
>
> I am using a DataGrid to show a table. Some of the columns are showing
> numeric data. I need to show these numeric data as hyperlinks so that
> the
> user can drill downward (or get more details about the data). Thanks in
> advance.
>
> Newbie



Nov 16 '05 #5
PP
See if this helps

http://www.c-sharpcorner.com/Code/20...LinkColumn.asp
"Nicholas Paldino [.NET/C# MVP]" wrote:
Newbie,

In order to do this, you will have to create your own column style that
derives from DataGridColumnStyle. Deriving from this class will allow you
to control how a column is rendered in the data grid. Once you do that, you
can assign it to your column, and create the semantics you are looking for.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
Hello!

I am using a DataGrid to show a table. Some of the columns are showing
numeric data. I need to show these numeric data as hyperlinks so that the
user can drill downward (or get more details about the data). Thanks in
advance.

Newbie


Nov 16 '05 #6

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

Similar topics

3
by: Kumar | last post by:
Hi Folks, I have a question regarding conditional hyperlink in datagrid. I want to display Hyperlink if my QID values in (1,4,5,6) other wise i want to display just Qdescription with out...
2
by: damonf | last post by:
I'm currently trying to add an ASP hyperlink to a template column in a datagrid. The normal hyperlink column doesn't give me the ability to add attributes to the item. In my grid there are four...
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
1
by: D. Shane Fowlkes | last post by:
Hello All. I keep asking for help with this on the www.asp.net forums and nobody seems to be able to help. What I'm trying to accomplish is very simple. I simply want to create a Hyperlink...
3
by: Raja | last post by:
I have a datagrid, it has dropdown box as a column and i have one more column that has hyperlink. The NavigateURL for the hyperlink is to open a new window with a query stirng parameter as the...
6
by: epigram | last post by:
I'm using the DataGrid with AutoGenerateColumns set to false and choosing which columns I want in the grid by using the <Columns> attribute. What I want to do is to create a hyperlink out of one...
3
by: Tim::.. | last post by:
I currently have the following datagrid but want to turn the name and email column into a hyperlink in the codebehind! Can someone please tell me how I achieve this! Thanks Private Sub...
10
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
3
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I...
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
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
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.