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 6882697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:17:15+00:00 2026-05-27T05:17:15+00:00

I have GRIDVIEW in ASP.NET Page and I am converting it into infragistics webdata

  • 0

I have GRIDVIEW in ASP.NET Page and I am converting it into infragistics webdata grid.

Now my grid has functionalities of opening file, copy file, edit description of file, emailing file and deleting file.

It is based on documents.

Now suppose if I take example of deleting file the original code is:

  protected void lbEmailDocument_Click(object sender, CommandEventArgs e)

    {

        int index = Int32.Parse(e.CommandArgument.ToString());

        Session["strDocumentToAttach"] = ((Label)gvDocuments.Rows[index].Cells[0].FindControl("lblPath")).Text;

        Session["strSubject"] = "Case Document E-mail (Case # " + lblCaseNumber.Text.Trim() + ")";

        Session["strNote"] = "Please find the attached document " + ((Label)gvDocuments.Rows[index].Cells[0].FindControl("lblFileName")).Text;

        ScriptManager.RegisterStartupScript(Page, this.GetType(), "myPopUp", "<script language='Javascript'>mywin=window.open('Case_Email.aspx?CaseID=" + lblCaseID.Text + "', '', 'location=0,status=0,resizable=1,scrollbars=1,height=920px, width=1250px');mywin.moveTo(0,0);</script>", false);



        // Response.Redirect("Case_Email.aspx?CaseID=" + lblCaseID.Text);

    }

Now when I change this : Instead of Rows[index].Cells[0] I am not able to access the cell value.

Please guide me through, How to change it.

Implementing the code given by you I got following error:

enter image description here

  • 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-27T05:17:16+00:00Added an answer on May 27, 2026 at 5:17 am

    I believe that you want to use Items instead of Cells.

    This code assumes that each cell is templated.

      protected void lbEmailDocument_Click(object sender, CommandEventArgs e)
    
        {
    
            int index = Int32.Parse(e.CommandArgument.ToString());
    
            Session["strDocumentToAttach"] = ((Label)gvDocuments.Rows[index].Items[0].FindControl("lblPath")).Text;
    
            Session["strSubject"] = "Case Document E-mail (Case # " + lblCaseNumber.Text.Trim() + ")";
    
            Session["strNote"] = "Please find the attached document " + ((Label)gvDocuments.Rows[index].Items[0].FindControl("lblFileName")).Text;
    
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "myPopUp", "<script language='Javascript'>mywin=window.open('Case_Email.aspx?CaseID=" + lblCaseID.Text + "', '', 'location=0,status=0,resizable=1,scrollbars=1,height=920px, width=1250px');mywin.moveTo(0,0);</script>", false);
    
    
    
            // Response.Redirect("Case_Email.aspx?CaseID=" + lblCaseID.Text);
    
        }
    

    However, if the values you are looking for are in columns, then you need to use code similar to the following:

      protected void lbEmailDocument_Click(object sender, CommandEventArgs e)
    
        {
    
            int index = Int32.Parse(e.CommandArgument.ToString());
    
            Session["strDocumentToAttach"] = gvDocuments.Rows[index].Items.FindItemByKey("lblPath").Value;
    
            Session["strSubject"] = "Case Document E-mail (Case # " + lblCaseNumber.Text.Trim() + ")";
    
            Session["strNote"] = "Please find the attached document " + gvDocuments.Rows[index].Items.FindItemByKey("lblFileName").Value;
    
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "myPopUp", "<script language='Javascript'>mywin=window.open('Case_Email.aspx?CaseID=" + lblCaseID.Text + "', '', 'location=0,status=0,resizable=1,scrollbars=1,height=920px, width=1250px');mywin.moveTo(0,0);</script>", false);
    
    
    
            // Response.Redirect("Case_Email.aspx?CaseID=" + lblCaseID.Text);
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a devexpress gridview within my asp.net page which has a filter row.
I have a GridView on an ASP.NET page with a TemplateField column that has
On an ASP.NET page, I have a GridView populated with the results of a
I have an ASP.NET page with a gridview control on it with a CommandButton
I have an Asp.Net page containing one GridView and a couple of images (google
I have an ASP.NET page where I am showing products in a Gridview control.
I have an ASP.NET 3.5 page with a gridview databound to a generic list
I have an ASP.NET GridView with paging enabled. The list of page indexes are
I have a GridView control in an Asp.net application, that has a <asp:buttonField> of
I have a ASP.Net web page with a grid view. I want to filter

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.