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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:36:07+00:00 2026-05-21T03:36:07+00:00

I have gridview1 on sample.asp page. It has about 15 rows. What i want

  • 0

I have gridview1 on sample.asp page. It has about 15 rows. What i want to do is:

If i click on a row (say row 7) in the gridview1, it should update a few other rows (say rows 2,3,4) in the same gridview. On clicking the row, I want to call the function UpdateOnClick() that is already present in the sample.asp.cs file. This function should change the values in the desired rows on the same gridview.

I want to update a few other rows on the same gridview

how can i achieve this?

  • 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-21T03:36:07+00:00Added an answer on May 21, 2026 at 3:36 am

    You can call the UpdateOnClick from the OnRowCommand, the CommandEventArgs (which most people call e) gives the selected row in its CommandArgument property.

    From this, you can iterate through the rows to find the ones you want. This should give you enough copy and paste food anyway:

    protected void GridView1_OnRowCommand(object sender, GridViewCommandEventArgs e)
    {
        int rownum = Convert.ToInt32(e.CommandArgument.ToString());
        foreach(GridViewRow row in sender.Rows)
        {
            if(row.Cells[0].Text == "a-value-")
            {
                 // Do something....
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a gridview control which will show X amount of rows. I want to
I have a GridView control in an Asp.net application, that has a <asp:buttonField> of
I have a simple ASP page with databound grid (bound to an object source).
I have a simple gridview <asp:GridView ID=GridView1 runat=server DataKeyNames=OriginatorID AutoGenerateColumns=False AllowPaging=True OnPageIndexChanging=GridView1_PageIndexChanging PageSize=5 OnPreRender=GridView1_PreRender>
I'm seeing this issue . I have a relatively simple ASP.NET page with a
I'am building an asp.net application that have a gridview inside an update pannel. In
i have wrote a simple website with asp and have girdview in it.i want
I have a very simple ASP.Net page that acts as a front end for
I currently have an ASP.NET GridView that displays a few columns to the user
I have a simple gridview that contains a label in one of the rows.

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.