Hello,
I want to set the value of a tool tip based on a value of an item in my grid. I have tried this, but I get an error:
This is above all HTML taken from an example
<TelerikTooltip TargetSelector=".tooltip-target">
</TelerikTooltip>
<GridColumn Editable=false Locked=true Visible="@isIDVisible" Field=@nameof(ProductDto.ProductId) Title="ID" Width="150px">
<Template>
@{
var item = (ProductDto)context;
}
<TelerikButton ThemeColor="success" OnClick="() => SetAmtToAnotherCol(item)">Test</TelerikButton>
<br />
<TelerikButton FillMode="link" ThemeColor="info" Class="tooltip-target"
Title="(@item.UnitsInStock < 0) ? 'neg' : 'pos'"
OnClick="() => SetAmtToAnotherCol(item)">@item.UnitsInStock</TelerikButton>
</Template>
</GridColumn>
I receive this error:
RZ9986 | Component attributes do not support complex content (mixed C# and markup). Attribute: 'Title', text: '(item.UnitsInStock < 0) ? 'neg' : 'pos''
|
If I simply do this, it works:
Title=@item.UnitsInStock.ToString()
Is there a way for me to set a string based on a value?