Hello,
I am working with a RadGridView and developed two features:
1. A ListBox that displays the RadGridView's columns where the user can check/uncheck some columns or all of them. The purpose of the control is to show or hide the columns according to the CheckBox state.
2. User Settings mechanism that saves the columns visibility status to a file. After the application starts, I load the IsVisible status to the columns and override the configured value in the xaml.
I noticed that the default behavior in RadGridView is to show the rows even when there are 0 visible columns and the SelectedItem remains.
I would like to hide the rows and unselect the items.
I tried to use a data trigger to do this funcionality.
It works with a DataTrigger when the value Columns.Count = 0.
To finish this functionality I would like to update the data trigger to the Visible Columns count, which is not provided by Telerik.
How can I do that?
I tried to create an attached property that maintains a counter when the user change the state of the columns visibility from the ListBox, but it does not work when the state is changed from the xaml or the user settings.
I don't want to bind to Columns Collection Changed and Visibility Changed because I think it is an overhead for this functionality.
Can you expose this property or help me with a better solution?