I can't confirm that the solution posted under https://www.devexpress.com/Support/Center/Question/Details/T261047 is fixing the problem. I'm adding a TokenBox to an ItemGroup:
C#addressesGroupItem.Items.Add(
propertyToBind,
itemSettings =>
{
itemSettings.NestedExtensionType = FormLayoutNestedExtensionItemType.TokenBox;
itemSettings.Width = System.Web.UI.WebControls.Unit.Percentage(33);
itemSettings.NestedExtensionSettings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
itemSettings.NestedExtensionSettings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
itemSettings.Caption = "FQDN";
var fqdnTokenBoxSettings = (itemSettings.NestedExtensionSettings as TokenBoxSettings).Properties;
fqdnTokenBoxSettings.ShowDropDownOnFocus = ShowDropDownOnFocusMode.Never;
fqdnTokenBoxSettings.AllowCustomTokens = true;
fqdnTokenBoxSettings.NullText = "Please enter FQDNs";
(itemSettings.NestedExtensionSettings as TokenBoxSettings).ShowModelErrors = true;
});
The property to bind is of type: System.Linq.Expressions.Expression<Func<T, List<string>>> The created TokenBox then has the content: "System.Collections.Generic.List`1[System.String]" Please see attachment.
As a workaround I manually join the strings into a list:
public string FQDNListJoined
{
get
{
return string.Join(",", this.FQDNList);
}
}
But this is not the way as it should be.
Actually I'm pretty disappointed with the quality of your MVC controls. If you wonder what I'm talking about please have a check about my ticket history.
But with this workaround I don't get the values back. :-(
Hello,
Thank you for your report. I have reproduced the issue and sent a report to our developers for further research. We will inform you of our results.
Screenshot from Example
Running example
Is there a chance, that you can prioritize the problem as "Urgent" or "Very High"? Right now, the TokenBox is practically not useable.
I have passed all the information to our developers. We will do our best to fix the issue as soon as possible. Your patience is greatly appreciated.