Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7398527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:52:51+00:00 2026-05-29T03:52:51+00:00

I have grid that has a list of about 16 documents that can change

  • 0

I have grid that has a list of about 16 documents that can change depending on the person using the app. I’ve been asked to change three specific entries in the grid if they exist to links that open the documents.

How do I check for these three documents in the grid (column is called “Artifact”) and insert the correct link for each of the three documents instead of the default text?

    <asp:BoundField HeaderText="Artifact" DataField="ArtifactName" Visible="true" HeaderStyle-Width="300px"  HeaderStyle-HorizontalAlign="Left"></asp:BoundField>

The same links are available in other parts of our website. Here is how they are implemented on other pages

<asp:LinkButton 
ID="hypLnkAffidRelease2" 
runat="server" 
Text="Affidavit and Release form" 
/>


var url = ResolveUrl("~/FormViewer.aspx");

       this.lnkDownloadReleasefrm.Attributes.Add("onclick", " { popup=window.open('" + url + "?Form=4','Viewer','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=800, height=600'); popup.focus(); return false; }");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T03:52:52+00:00Added an answer on May 29, 2026 at 3:52 am

    You can create TemplateField with two ItemTemplate (Label & HyperLink)

    Label is more or less like BoundField once rendered.

    <asp:TemplateField HeaderText="Select">
        <ItemTemplate>
            <asp:Label ID="NoLink" runat="server"></asp:Label>
            <asp:LinkButton ID="WithLink" runat="server" OnClick="Go_Click"/>
        </ItemTemplate>               
    </asp:TemplateField>
    

    When you bind the gridview

    GridView.DataSouce = theData;
    GridView.DataBind();
    
    //index refers to the column number of the template field
    for (int i=0; i<in GridView.Rows.Count; i++)
    {
        Label a = (Label)GridView.Rows[i].Cells[index].FindControl("NoLink");
        LinkButton b = (LinkButton)GridView.Rows[i].Cells[index].FindControl("WithLink");
    
        if (// link exists)
        {
            a.Visible = false;
            b.Visible = true;
        }
    
        else)
        {
            a.Visible = true;
            b.Visible = false;
        }  
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using .NET webforms. I have a grid view that can use Eval(Name) in
I have a datagridview that has been populated from a datatable using the datasource
I have a Kendo grid that has been sort-enabled. I want to do an
I have a web application that has a grid displaying a paged list of
I have a grid that has multiple rows. I want to hide/show one of
I have a grid view that has two simple columns, a report number and
I have a Telerik Grid which has a footer that needs to display column
I have a partial view that uses a Telerik MVC Grid, and it has
I have about 20 grid views that I have to create. All of them
I have a class MyClassA that has an IList property. I am using a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.