Completed
Last Updated: 15 Feb 2021 11:01 by ADMIN
Release R1 2021 SP2
Ketan
Created on: 28 Dec 2020 07:07
Category: ListControl
Type: Bug Report
1
RadListControl: SelectAll issue when EnableAlternatingItemColor is On

Please use the following code snippet. When you select all items, only half of the items have the selected color applied:

 

        public RadForm1()
        {
            InitializeComponent(); 

            for (int i = 0; i < 20; i++)
            {
                this.radListControl1.Items.Add("Item" + i);
            }

            this.radListControl1.EnableAlternatingItemColor = true;
            this.radListControl1.SelectionMode = SelectionMode.MultiSimple;
        }

        private void radButton1_Click(object sender, EventArgs e)
        {
            this.radListControl1.SelectAll();
        }

Workaround: 

            this.radListControl1.SelectAll();
            DefaultListControlStackContainer viewElement = this.radListControl1.ListElement.ViewElement as DefaultListControlStackContainer;
            if (viewElement != null)
            {
                viewElement.ForceVisualStateUpdate();
            }
        }

 

Attached Files:
0 comments