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.
I have implemented this functionality using command field itself in gridview's row databound event,
This code works fine in all browsers!