473,386 Members | 1,720 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.

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 4038
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alphonse Giambrone | last post by:
I am trying to enable/disable a requiredfieldvalidator on the client side and am generating an error. I had found some documentation on validation which states that I should be able to...
3
by: DBQueen | last post by:
I have a form with lines of controls. On some of the lines there are 3 controls (call them A,B,C); other lines have only control A. The controls have been numbered sequentially (Q20, Q21....Q76)...
0
by: talal | last post by:
How to check whether javascript is enable or disable in client browser. Remeber i can check wheter browser client support javascript with BrowserCapability class. But what if the client has disable...
0
by: pargat.singh | last post by:
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" ...
8
by: rongchaua | last post by:
Hi all, i would like now to disable and enable network adapter programmatically with c#. I have searched but found nothing useful. There's no topic about this problem. Has someone done with this...
8
by: =?Utf-8?B?TWlrZSBSYW5k?= | last post by:
I am trying to get a list of files from a specified directory using the System.IO namespace classes, and then use that list as the datasource for a GridView. I have been able to do this...
8
by: Jeff | last post by:
ASP.NET 2.0 I'm wondering how to set the color of a visited HyperLinkField (the link text) in a GridView?? Here is the markup of the HyperLinkField I have problems with: <asp:HyperLinkField...
3
by: Pietro | last post by:
Hi all, First of all I'd like to thank you very very much ,as finally after many years of searching,I could find a code to disable/enable the shift key,but actually i cannot use the code as I'm...
2
by: Naushad | last post by:
Hi all, I am using the countinous form. I want to Enable/Disable the some fields for perticular records as per the following condition when open the form. I have written this code in "On Current...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: 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
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,...

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.