Hi,
I'm trying to change the text of the checked item of a RadCheckedDropDownList by using the TextBlockFormatting event.
TokenizedTextBlockElement token = e.TextBlock
as
TokenizedTextBlockElement;
if
(token !=
null
&& token.Item.Value !=
null
)
{
token.DrawText =
false
;
token.ContentElement.Text =
string
.Format(
"{0}"
, ((Telerik.WinControls.UI.RadListDataItem)token.Item.Value).Value);
}
this works, the items are displayed correctly. However, if there are multiple checked items and one item becomes unchecked (by using the X) the complete selection is cleared. The Datasource is a Dictionary<dynamic, string>(). Without the formatting everything works fine.
I've tried CreateTextBlock without any luck. I've seen there is some code with a custom TokenizedTextBlockElement, but I hope there is a simpler way?!
There should be a XXXMember property like the DescriptionTextMember, AutoCompleteDisplayMember otherwise there is nothing about RAD in your RAD components ... last time i checked RAD was short for Rapid Application Development and not investing 2+ hours for such a simple task. And NO I don't want to format the items in the dropdown since I have some dropdowns with >2000 Items and it becomes very slow if I add the formatting.