Underscores in RadPivotFieldList

5 posts, 0 answers
  1. Gianpaolo
    Gianpaolo avatar
    14 posts
    Member since:
    Nov 2013

    Posted 11 Oct 2019 Link to this post

    Is it possible to change the behavior of the checkboxes inside RadPivotFieldList so that the first underscore of the label is visible? I cannot find a way without retemplating the whole control. The text actually is UID_BNK - bank code, but the underscore is swallowed by the checkbox.

    Kind regards,

    Gian Paolo

     

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1099 posts

    Posted 16 Oct 2019 Link to this post

    Hello Gianpaolo,

    Thank you for the provided image.

    The underscores in a CheckBox control are used for key access. More information about this can be found in the following article: Missing Underscore with Label or CheckBox.

    What I can suggest to correctly display it would be to iterate over all checkboxes in the loaded event of the RadPivotFieldList and escape the underscore, like so:

            private void radPivotFieldList_Loaded(object sender, RoutedEventArgs e)
            {
                var list = sender as RadPivotFieldList;
                var checkBoxes = list.ChildrenOfType<CheckBox>();
                foreach (var checkBox in checkBoxes)
                {
                    checkBox.Content = checkBox.Content.ToString().Replace("_", "__");
                }
            }
    Please let me know whether such an approach would work for you.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Gianpaolo
    Gianpaolo avatar
    14 posts
    Member since:
    Nov 2013

    Posted 17 Oct 2019 in reply to Dilyan Traykov Link to this post

    Thank you Dilyan, i will try this when i get the chance.
  4. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1099 posts

    Posted 18 Oct 2019 Link to this post

    Hello Gianpaolo,

    Do let me know how this goes. I will be awaiting your reply.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  5. Gianpaolo
    Gianpaolo avatar
    14 posts
    Member since:
    Nov 2013

    Posted 21 Oct 2019 in reply to Dilyan Traykov Link to this post

    That'll work. Thank you Dilyan
Back to Top