Dec 28, 2014, 5:11 PM
[CLOSED] TagField : How to allow duplicate Tag in TagField
Hi I have a (,) separated string like bellow,
please assist me how to display duplicate tag in tagfield with above approach.
I am doing this because ,bellow code not working
a,+,b,+,c,-,d,*e
and now I try to this in a tag,for this I use bellow code string s="a,+,b,+,c,-,d,*e";
string[] rawformula = s.Split(',');
Tags t = new Tags();
foreach (string s in rawformula)
{
t.Add(new Tag(s));
}
TagField tf = this.GetCmp<TagField>("tag");
tf.Clear();
tf.SetRawValue(t);
and when displayed in tagfield it will show only one (+) .please assist me how to display duplicate tag in tagfield with above approach.
I am doing this because ,bellow code not working
string s="a,+,b,+,c,-,d,*e";
string[] rawformula = s.Split(',');
foreach (string s in rawformula)
{
data.Add(new { Formula = s});
}
var tagStore = X.GetCmp<Store>("tagStore");
tagStore.LoadData(data);
return this.Direct();
X.TagField()
.ID("tag")
.HideSelected(true)
.Width(375)
.HideTrigger(true)
.Editable(true)
.DisplayField("Formula")
.ValueField("Formula")
.MultiSelect(true)
.Store(X.Store()
.ID("tagStore")
.Model(X.Model()
.Fields(
Html.X().ModelField().Name("Formula").Type(ModelFieldType.String)
)
)
)
Last edited by Daniil; Dec 31, 2014 at 1:51 PM.
Reason: [CLOSED]