0

The conditional tooltip is not working on kendo UI Grid column.

The following code is not applying the condition for title and instead showing the whole text

'#= (!IsSynced && !AddressNickname.includes('NA')) ? 'This can be updated in the details tab' : 'Edit Address' #'

Here is the Code

 columns.Command(command => command.Custom("Address")
  .Click("AddressList.Address")
  .Text("<span class='fas fa-pencil-alt fa-fw'></span>")
  .HtmlAttributes(new { title = "#= (!IsSynced && !AddressNickname.includes('NA')) ? 'This can be updated in the details tab' : 'Edit Address' #" })
1
  • You are using #= which renders the raw value. #: will render the value as HTML, but just # will execute arbitrary JavaScript, which looks to be the one you want. Commented 2 days ago

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.