Completed
Last Updated: 07 May 2019 08:23 by ADMIN
Release R2 2019
Shawn
Created on: 01 Feb 2019 20:37
Category:
Type: Bug Report
1
FIX. RadLIstView - the current column is not cleared when there is no items with the Fluent theme

Steps:

1) Add a RadForm with a button and a ListView in DetailView mode.

2) Add some columns. Add some items with values for each cell.

3) Apply Fluent Theme to all controls.

4) In the click handler of the button clear the listview items collection.

5) Run the app, select a row. Click the button to clear the list.

 

Desired Result:

The listview should have a consistent column highlight style between the default Rad theme and Fluent Theme, and/or MS WinForms.

 

Actual Result:

See attachment. The associated column of the selected cell is highlighted but only in the Fluent Theme, and it remains highlighted even in an empty listview. My user's are confused and complaining.

Not sure why Fluent is highlighting columns when the default theme doesn't.

 

Work Around:

Loop through all of the listview headers and reset the colors.

            foreach(var item in this.radListView1.RootElement.ChildrenHierarchy)
            {
                if (item is DetailListViewHeaderCellElement)
                {
                    var Header = item as DetailListViewHeaderCellElement;
                    Header.BackColor = SystemColors.Control;
                    Header.ForeColor = SystemColors.ControlText;
                }
            }
Attached Files:
3 comments
ADMIN
Dimitar
Posted on: 06 Feb 2019 09:44
Hi Shawn,

ValueResetFlags should be set to Local (reset the locally set value only). I have attached a small project that shows how this works on my side.

Let me know if you have additional questions.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Attached Files:
Shawn
Posted on: 05 Feb 2019 19:01

I also tried this, but it didn't reset the colors. Tried various ValueResetFlags, nothing. Not sure why...

Header.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.All);
Header.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.All);

ADMIN
Dimitar
Posted on: 05 Feb 2019 15:16
Hello Shawn,

I was able to reproduce this. I have updated your Telerik Points.

Another workaround would be to clear the CurrentItem/CurrentColumn:
private void radButton1_Click(object sender, EventArgs e)
{
    this.radListView1.CurrentColumn = null;
    this.radListView1.CurrentItem = null;
    this.radListView1.DataSource = null;
 
}

Should you have any other questions do not hesitate to ask.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.