This question is locked. New answers and comments are not allowed.
Hello,
On my page, I have some tabs, one with a RadTreeListView, one with a RadGridView. Both have 26+ columns. Users can select witch columns they would like to view, and save that selection for later. The ItemsSource of the grid and treelist and the visibility of the columns are set by data binding. I'm also trying to set the DisplayIndex by data binding.. (I am using Silverlight 4 with MVVM)
By default, one of the tabs is set as selected. When I load my page, the data is loaded correctly, and the visibility binding on columns is correct, but the DisplayIndex seem to be attributed randomly. It doesn't even follow the order of the xaml. However, when I select the second tab, that [grid or treelist] has its columns in the correct order. The first tab also seems to be ignoring any change in the column ordering, while the second tab will behave normally and reorder as requested. It doesn't matter witch tab is default select, grid or treelist, the first one will always have wrong column order.
Any idea why this is happening and how to fix it?
I tried to create the columns in code-behind instead of having them all predefined, but it was causing way too much lagging in my page, so it's not really an option.
Thank you
Gen
On my page, I have some tabs, one with a RadTreeListView, one with a RadGridView. Both have 26+ columns. Users can select witch columns they would like to view, and save that selection for later. The ItemsSource of the grid and treelist and the visibility of the columns are set by data binding. I'm also trying to set the DisplayIndex by data binding.. (I am using Silverlight 4 with MVVM)
<
telerik:GridViewDataColumn
IsVisible
=
"{Binding Source={StaticResource Locator}, Path=myVM.IsVisibleKey}"
DisplayIndex
=
"{Binding Source={StaticResource Locator}, Path=myVM.IndexKey}"
UniqueName
=
"Item.Key"
Header
=
"Key"
IsGroupable
=
"False"
IsReadOnly
=
"True"
CellTemplate
=
"{Binding Source={StaticResource KeyDataTemplate}}"
/>
By default, one of the tabs is set as selected. When I load my page, the data is loaded correctly, and the visibility binding on columns is correct, but the DisplayIndex seem to be attributed randomly. It doesn't even follow the order of the xaml. However, when I select the second tab, that [grid or treelist] has its columns in the correct order. The first tab also seems to be ignoring any change in the column ordering, while the second tab will behave normally and reorder as requested. It doesn't matter witch tab is default select, grid or treelist, the first one will always have wrong column order.
Any idea why this is happening and how to fix it?
I tried to create the columns in code-behind instead of having them all predefined, but it was causing way too much lagging in my page, so it's not really an option.
Thank you
Gen