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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:43:56+00:00 2026-05-25T14:43:56+00:00

My gridview consists of a command field with ‘showedit’ button property set to true.

  • 0

My gridview consists of a command field with ‘showedit’ button property set to true. All functionalites are working fine except that tooltip is not displaying for the autogenerated update and cancel buttons, instead it displays tooltip as ‘edit’ itself which is the tooltip for ‘edit’ button. It is displaying correctly in IE compatibility view but not in IE 8 or Chrome or FF browsers!. I searched in net, most solutions suggested to use template field instead of command field, my problem is at this stage implementing template field will result in lot of code changes. Please suggest whether this is possible in Command field itself! The gridview design code is given below:

<asp:CommandField ButtonType="Image" ShowEditButton="True" ValidationGroup="EditAnswer" CancelImageUrl="../images/Cancel.jpg" CancelText="Click to cancel" UpdateImageUrl="../images/Update.jpg" UpdateText="Click to save this answer" EditImageUrl="../images/Edit.jpg" EditText="Click to edit this answer">              <ControlStyle CssClass="para1" />                                                      <ItemStyle HorizontalAlign="Center" Width="10%" />                             </asp:CommandField>

I tried setting tooltip for autogenerated update and cancel buttons also but this also failed because I am not able to get the controls for update and cancel buttons in row databound event.

  • 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-25T14:43:57+00:00Added an answer on May 25, 2026 at 2:43 pm

    I have implemented this functionality using command field itself in gridview’s row databound event,

        if (e.Row.RowType == DataControlRowType.DataRow)
        {            
            e.Row.Cells[2].ToolTip = "Click to Edit answer";
            if (e.Row.RowState == DataControlRowState.Edit || e.Row.RowState.ToString() == "Alternate, Edit")
            {
                int i = 0;
                foreach (TableCell cell in e.Row.Cells)
                {
                    if (e.Row.Cells.GetCellIndex(cell) == 2)
                    {
                        ((System.Web.UI.WebControls.ImageButton)(e.Row.Cells[2].Controls[0])).ToolTip = "Click to update answer";
                        ((System.Web.UI.LiteralControl)(e.Row.Cells[2].Controls[1])).Text = "&nbsp;";
                        ((System.Web.UI.WebControls.ImageButton)(e.Row.Cells[2].Controls[2])).ToolTip = "Click to cancel answer";
                    }
                    i++;
                }
            }
        }
    

    This code works fine in all browsers!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

GridView Sorting and Paging are works fine when I set EnableSotringAndPagingCallbacks to false. however
In gridview control, am using RowEditingevent. I have created a command field to handle
I have a UI that consists of a Gridview loaded with a custom adapter.
I have ModalPopupExtender that contains a UserControl that basically consists of a GridView and
i have a gridview i am working on VS2008 ASP.Net forms Currently, my update
I've implemented a 'home screen' for my application, which consists of a gridview containing
i have to modify an asp.net application. The app consists of an huge gridview
I am having a gridview which consist of add button for adding a new
I have an activity which consists of a GridView with multiple (different) images. When
In GridView the item at index 1 is not receiving click event but all

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.