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

Q: Get Text from Hyperlink Column?

Hi,

I have a column in my DataGrid which is a Hyperlink Column. Everything work
fine except when I try to get the text of the column using
this.DataGrid.SelectedItem.Cells[6* ].Text, I got blank value!!

People from some forum suggest to use ((LinkButton)
this.DataGrid.SelectedItem.Cells[6* ].Controls[0]).Text, but I got
"Specified cast is not valid" error.

P.s. I am using codebehind method.

Please help.

Thank you.

--
Soul


Nov 18 '05 #1
1 1280
Ok... I cast to wrong thing... it is a HyperLink, not LinkButton!

--
Soul
"Soul" <no@spam.net> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl...
| Hi,
|
| I have a column in my DataGrid which is a Hyperlink Column. Everything
work
| fine except when I try to get the text of the column using
| this.DataGrid.SelectedItem.Cells[6 ].Text, I got blank value!!
|
| People from some forum suggest to use ((LinkButton)
| this.DataGrid.SelectedItem.Cells[6 ].Controls[0]).Text, but I got
| "Specified cast is not valid" error.
|
| P.s. I am using codebehind method.
|
| Please help.
|
| Thank you.
|
| --
| Soul
|
|
|
|
Nov 18 '05 #2

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

Similar topics

6
by: Tina | last post by:
I'm going through a DataGridItem looking to find the text in a hyperlink column. It's not in mydataGridItem.cells(3).text. Where is it? thanks, T
6
by: GaryB | last post by:
Does anyone have any idea how to get the text out of a hyperlink column in a web datagrid? It's a hyperlink column, not a template column so findcontrol does not work and there is no apparent...
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...
1
by: jeguillo | last post by:
I am trying to retrieve the text within each cell in a datagrid in order to change the color of each cell, depending on the value within that cell. This works fine on the cells that are bound...
8
by: Sohan Kamat | last post by:
Hi, I have a webform and I want to create a hyperlink to a text file, so that it opens on internet explorer in a new window. I have added the following <a href="file:///D:/Test/Test.txt" ...
3
by: sohan | last post by:
hi I have hyperlink column in a datagrid. The column contains the name of a text file. I am able to appendthe full path of the file. The file is on D drive on the server. But on clicking on...
3
by: Bren | last post by:
Hi All VS2005 Gridview control with vb I am populating a gridview of company staff. One of the columns is a hyperlink to a SMS texting facility I have so secrataries can text the managers...
2
by: mallz | last post by:
hi, in my table one of the column field has a hyperlink that takes me to another page. but, i needed to restrict the size of the column and so i put in into a text box. But, a new user would be...
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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...

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.