>>Hi everybody,
>>
>>We have a GridView that allows editting. I have the following code to adjust the tooltip
>
>It's not clear from your code sample if you have only two (one for Edit/Save and one for Delete) or three buttons (one for Edit, one for Delete and one for Save). If there are just two, the edit button's tooltip still says "Edit" because you're still setting it that way in the code below (code starting with) if (btnEdit != null). I get the feeling there is more code that is running here than what you posted, so it's hard to help (for example, you didn't show what method that code was running in - I'm assuming in one of the data binding/bound events).
Hi Paul,
It's a GridView with CommandFields (Delete, Select, Edit). The code is in RowDataBind method. Once you click the Edit button, you can update that row and the button's tooltip should say "Save" or "Update", but not Edit. While I was walking here I was thinking that may be I can add OnClick attribute that would change Title (tooltip corresponds to title in image button) depending on what does it say presently. In other words, I need a little script, something like (pseudo-code)
if left(Title,4) = 'Edit)
title = replace(title, 'Edit','Save')
else
...
endif
But may be there is a better and simpler approach? What exact method fires when you click on Edit CommandField in a GridView?
Thanks again.
If it's not broken, fix it until it is.
My Blog