Unplanned
Last Updated: 28 Apr 2026 12:02 by Martin Ivanov
Martin Ivanov
Created on: 28 Apr 2026 12:02
Category: Spreadsheet
Type: Bug Report
0
Spreadsheet: The items in the named ranges drop down list don't display underscore character if presented in the name of the range

RadSpreadsheetFormulaBar has a drop down list that shows the named ranges in the document. If a named range contains an underscore character (ex: Income_Amount), the associated item in the drop down won't display the underscore (ex: IncomeAmount).

To workaround this, you can use a global Loaded event handler of RadMenuItem and override the Header content with a TextBlock.

static MainWindow()
{
    EventManager.RegisterClassHandler(typeof(RadMenuItem), RadMenuItem.LoadedEvent, new RoutedEventHandler(OnMenuItemLoaded));
}

private static void OnMenuItemLoaded(object sender, RoutedEventArgs e)
{
    var menuItem = (RadMenuItem)sender;
    if (menuItem.DataContext is DefinedName context)
    {
        menuItem.Header = new TextBlock() { Text = context.Name };
    }
}

0 comments