This question is locked. New answers and comments are not allowed.
Hi all,
I have a problem with hierarchy expander column. I have a gridview configured in xaml:
I have buttons to select entity type (table) to show that set ItemsSource by code:
after a call to a reset code (perhaps to change):
All works correctly... on a button (that select a table) I set up a Master/Child relation to show related data (before re-assign ItemsSource property):
This work correctly too.
Now, if I configure and load a table that hasn't master/detail records to show (plain table) it shows correctly, then if I click button to show (after reset) a table that has master/detail (with a ChildTableDefinition like the code provided) it works fine, shows the expander column, etc... at this point if I click again the button to show a plain table (always after the reset code) the grid still show the expander column (see attached image) that causing a column shift too....! Seems that there are no ways to hide it...I have made a lot of tests...
Perhaps it is a bug or perhaps I missing something in my "reset" code...
Help please!
Many thanks in advance!!
Davide
I have a problem with hierarchy expander column. I have a gridview configured in xaml:
| <telerikGrid:RadGridView x:Name="rgv01" |
| telerik:StyleManager.Theme="Office_Blue" |
| Grid.Row="0" |
| Grid.RowSpan="2" |
| MinHeight="400" |
| RowDetailsVisibilityMode="VisibleWhenSelected" |
| AutoGenerateColumns="False" |
| CanUserInsertRows="True" |
| RowIndicatorVisibility="Collapsed" |
| CanUserFreezeColumns="False" |
| ColumnsWidthMode="Auto" |
| FontSize="9" |
| IsReadOnly="False" |
| VerticalGridLinesBrush="#FFFFFFFF" |
| ShowGroupPanel="False"> |
| </telerikGrid:RadGridView> |
I have buttons to select entity type (table) to show that set ItemsSource by code:
| // ... Create some data columns on rgv01 here... |
| // ... |
| rgv01.ItemsSource = dds01.Data; |
after a call to a reset code (perhaps to change):
| private void ResetGrid() |
| { |
| rgv01.ItemsSource = null; |
| rgv01.ChildTableDefinitions.Clear(); |
| rgv01.GroupDescriptors.Clear(); |
| rgv01.SortDescriptors.Clear(); |
| rgv01.Columns.Clear(); |
| } |
All works correctly... on a button (that select a table) I set up a Master/Child relation to show related data (before re-assign ItemsSource property):
| // ... |
| GridViewTableDefinition td = new GridViewTableDefinition(); |
| td.Relation = new Telerik.Windows.Data.PropertyRelation("InterviewChoice"); |
| rgv01.ChildTableDefinitions.Add(td); |
| // ... |
This work correctly too.
Now, if I configure and load a table that hasn't master/detail records to show (plain table) it shows correctly, then if I click button to show (after reset) a table that has master/detail (with a ChildTableDefinition like the code provided) it works fine, shows the expander column, etc... at this point if I click again the button to show a plain table (always after the reset code) the grid still show the expander column (see attached image) that causing a column shift too....! Seems that there are no ways to hide it...I have made a lot of tests...
Perhaps it is a bug or perhaps I missing something in my "reset" code...
Help please!
Many thanks in advance!!
Davide