I've been banging my head everywhere trying to figure out how to hide values bound to a GridViewComboBox column.
I'm using ItemsSourceBinding to populate the dropdown with values and then matching up to default values from ItemsSource. Basically some of the values that are prepopulated from another system like "Approved" or "New" I want to not make those options selectable when the user tries to edit the cell even though they can see them.
<telerik:RadGridView VerticalAlignment="Stretch" Grid.Row="1" x:Name="PoliciesGridView" ItemsSource="{Binding Policies, Mode=TwoWay}" AutoGenerateColumns="False" DataLoaded="PoliciesGridView_DataLoaded" SelectionMode="Extended" ScrollViewer.VerticalScrollBarVisibility="Visible" CellEditEnded="CellEditEnded" GroupRenderMode="Flat" CanUserDeleteRows="False" Grouped="Grid_Grouped" KeyUp="HandleKeyUpEvent">
<telerik:EventToCommandBehavior.EventBindings>
<telerik:EventBinding Command="{Binding EditCommand}" EventName="BeginningEdit" PassEventArgsToCommand="True"/>
</telerik:EventToCommandBehavior.EventBindings>
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding CurrentStatus, Mode=TwoWay}" Tag="CurrentStatus" Header="Status" ItemsSourceBinding="{Binding PolicyStatusCodeTable}" DisplayMemberPath="PolicyStatusDsc" SelectedValueMemberPath="PolicyStatusDsc" CellStyleSelector="{StaticResource editedCellStyle }" TextAlignment="Right"/>
I have been successful in setting up an EditCommand to cancel the edit if the Status is Approved thereby making any rows that are Approved read-only as well as reverting the value back to the original value should they choose Approved. It's a hack but I feel like there should be a way to just hide those options from the gridviewcombobox so users can't select them.