This is a migrated thread and some comments may be shown as answers.

Underscores in RadPivotFieldList

4 Answers 31 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Gianpaolo
Top achievements
Rank 1
Gianpaolo asked on 11 Oct 2019, 02:58 PM

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

 

4 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 16 Oct 2019, 11:40 AM

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.
0
Gianpaolo
Top achievements
Rank 1
answered on 17 Oct 2019, 03:33 PM
Thank you Dilyan, i will try this when i get the chance.
0
Dilyan Traykov
Telerik team
answered on 18 Oct 2019, 08:31 AM

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.
0
Gianpaolo
Top achievements
Rank 1
answered on 21 Oct 2019, 07:41 AM
That'll work. Thank you Dilyan
Tags
PivotGrid
Asked by
Gianpaolo
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Gianpaolo
Top achievements
Rank 1
Share this question
or