我正在使用devexpress的 dxRadioGroup
我想将输出显示为:
Selected (10)
All (235)
我有:
Enum source
{
Selected
All
}
我有一个类型为 source [] 的数组,其中包含文档数
所以我得到的是
[10, 235] (this.allowedSources)
我的代码如下:
SomeId.dxRadioGroup(
{
items: this.allowedSources,
value: this.allowedSources[0],
itemTemplate: (data, index, element): void =>
{
element.append($("<div>").text(source[index] + " " + "(" + data + ")"));
}
});
因此,我已经设法显示 已选(10) 全部(235)作为输出
但是我想更改dxRadioGroup的 ValueExpr当前包含计数 我希望它是枚举类型 它应该等效于 source.All,source.Selected
我该如何更改?