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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:35:29+00:00 2026-06-07T04:35:29+00:00

I got following error while i am clicked edit button on grid view for

  • 0

I got following error while i am clicked edit button on grid view for 2 page

    System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

can you please specify what should i have to do to remove this error

following is the code for edit command, It works well when i am on first page but gives erro if i goes to another any page in grid view

protected void GVviewReminder_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        lblError.Text = "";
        if (e.CommandName == "Edit")
        {
            GridViewRow selectedRow = GVviewReminder.Rows[Convert.ToInt32(e.CommandArgument)];

            string ID = selectedRow.Cells[1].Text;

            Response.Redirect("edit_health_reminder.aspx?HealthReminderIsOpen=true&id=" + ID);
        }
    }
  • 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-06-07T04:35:33+00:00Added an answer on June 7, 2026 at 4:35 am

    The error log says index out of range so look at collections.

    GVviewReminder.Rows[Convert.ToInt32(e.CommandArgument)]
    
    selectedRow.Cells[1].Text
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the following error while running my perl script with the negative lookaround
I got the following error while trying to alter a column's data type and
I got following error... System.NullReferenceException: Object reference not set to an instance of an
I got the following output with error message while executing the program that uses
While installing Magento on server I got the following error Database server does not
I've got the following error while using getHibernateTemplate().persist() method in hql org.springframework.dao.InvalidDataAccessApiUsageException: detached entity
I got the following error/warning while tring to install Kohana/SilverStripe. What does it mean
I got the following error message while compiling, but I'm sure I have the
I've got the following error: TemplateSyntaxError at /admin/results_cop/copsegmentresult/ Caught an exception while rendering: ('ascii',
While working on an existing project I suddenly got the following error when trying

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.