469,902 Members | 1,813 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

Enable/Disable HyperLinkField

I am using <asp:HyperLinkField in gridview as below which is working
fine.

<asp:HyperLinkField HeaderText="Process"
Target="_blank" DataTextFormatString="Process me"
DataTextField="doc_name" DataNavigateUrlFields="doc_name"
DataNavigateUrlFormatString ="~/aaaa.aspx?path={0}" />

Currently it is displaying "Process Me" for all row and opening new
window.But i have some records which are already processed and for
those record i want to display Processed and i don't want to open the
new window.

Can anyone please show me how can i do that?

Thanks in advance.

Pargat

Apr 24 '06 #1
1 3779
Jon
Hello.

On the item databound event of the grid, you will need to see if the item
has been processed, if it has you would do

e.Item.FindControl("[HyperLinkField id"]").Text = "processed";
e.Item.FindControl("[HyperLinkField id"]").Enabled = False;

Hope that Helps,

Jon

"pa**********@gmail.com" wrote:
I am using <asp:HyperLinkField in gridview as below which is working
fine.

<asp:HyperLinkField HeaderText="Process"
Target="_blank" DataTextFormatString="Process me"
DataTextField="doc_name" DataNavigateUrlFields="doc_name"
DataNavigateUrlFormatString ="~/aaaa.aspx?path={0}" />

Currently it is displaying "Process Me" for all row and opening new
window.But i have some records which are already processed and for
those record i want to display Processed and i don't want to open the
new window.

Can anyone please show me how can i do that?

Thanks in advance.

Pargat

Apr 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Alphonse Giambrone | last post: by
reply views Thread by talal | last post: by
reply views Thread by pargat.singh | last post: by
8 posts views Thread by rongchaua | last post: by
8 posts views Thread by =?Utf-8?B?TWlrZSBSYW5k?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.