In the following scenario, the item's text in the drop-down list shows different text from the selected item.
When the document is open in a web browser :
When the document is open in the RadPdfViewer control.
Editor open and editor closed:
Hello Robert,
Thank you for reporting this behavior. As a workaround, we can subscribe to the RadPdfViewer control's MouseUp event and manually update the DisplayMember property.
private void RadPdfViewer1_MouseUp(object sender, MouseEventArgs e)
{
foreach (RadFixedPageElement visualPage in this.radPdfViewer1.PdfViewerElement.ViewElement.Children)
{
foreach (RadElement editorElement in visualPage.Children)
{
if (editorElement is RadDropDownListElement dropDownListElement)
{
var collection = (dropDownListElement.DataSource as IEnumerable<ChoiceOption>);
if (collection.Where(x => x.UserInterfaceValue != null).Count() == collection.Count())
{
dropDownListElement.DisplayMember = "UserInterfaceValue";
}
}
if (editorElement is RadListElement listElement)
{
var collection= (listElement.DataSource as IEnumerable<ChoiceOption>);
if (collection.Where(x=>x.UserInterfaceValue !=null).Count() == collection.Count())
{
listElement.DisplayMember = "UserInterfaceValue";
}
}
}
}
}Regards,
Dinko | Tech Support Engineer
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.