Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
set tooltip property is not being updated
posted

Hello

Im facing a problem, Im trying to update the tooltip of a webimagebutton without success.  I have a webdatagrid, where i have always 2 records, the first one is an editable record, and the other one is a non editable record. So, i have a single button "Edit", which when i select the editable record should say "Edit", and when i select the non editable record, should say "View". Everything works fine, the problem is with the tooltip. 

This is the code of the button(by default)

OnClick="m_editButton_Click" ToolTip="Edit selected device configuration.">

As you can see, by default, the text and tooltop refers to "Edit". And this, the javascript function where modifies the button text according selection made

function m_gridAfterRowActivate(gridName, rowId) {
var editButton = ig_getWebControlById("<%=m_editbutton.clientid%>");
if (isDefaultDevice)
{
editButton.setText('View');
}
else
{
editButton.setText('Edit')
}
}

As you can see, Im able to modify the Text to "View", once i select to the non editable record and viceversa, but, im not able to do it with tooltip. I was checking the documentation and im only see the setText method available for that purpose.

So, the question is : Is it possible to set the button tooltip according the option selected? Is there any available trick for that?

Thanks in advance for your support.

Kind Regards

Parents
No Data
Reply
  • 11095
    Verified Answer
    Offline posted

    Hello Carlos,

    Thank you for contacting Infragistics!

    You can use change the title of element.

    document.getElementById("<%=m_editbutton.clientid%>" + "__1").title = 'Desired value';

    Let me know if you need further assistance.

Children
No Data