This question is locked. New answers and comments are not allowed.
I have a property
And it's binded in this way:
And this is Handlers property:
The problem is that using ClearSelection button doesn't set my property.
I see that it's set value of RadComboBox
for x I get null
When I change user to another user it works correctly (It sets me property FirstFacingHandlerId).
How can I handle with this?
private const string FirstFacingHandlerIdPropertyName = "FirstFacingHandlerId"; public int FirstFacingHandlerId { get { return _firstFacingHandlerId; } set { if (_firstFacingHandlerId != value) { _firstFacingHandlerId = value; OnPropertyChanged(FirstFacingHandlerIdPropertyName); } } }And it's binded in this way:
<telerik:GridViewDataColumn DataMemberBinding="{Binding FirstFacingHandlerId}" Header="1st" IsReadOnly="True"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <telerik:RadComboBox SelectedValuePath="HandlerId" ClearSelectionButtonContent="SomeText" ClearSelectionButtonVisibility="Visible" SelectedValue="{Binding FirstFacingHandlerId, Mode=TwoWay}" x:Name="radComboBoxFirstFacingHandler" SelectionChanged="radComboBoxFirstFacingHandler_SelectionChanged" ItemsSource="{Binding Source={StaticResource Locator}, Path=ShowroomLog.Handlers}" DisplayMemberPath="HandlerName" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn>And this is Handlers property:
public ObservableCollection<Handler> Handlers { get { if (_handlers.Count == 0) { GetHandlers(); } return _handlers; } set { this._handlers = value; } }The problem is that using ClearSelection button doesn't set my property.
I see that it's set value of RadComboBox
private void radComboBoxFirstFacingHandler_SelectionChanged(object sender, SelectionChangedEventArgs e) { var X = ((RadComboBox) sender).SelectedValue; }for x I get null
When I change user to another user it works correctly (It sets me property FirstFacingHandlerId).
How can I handle with this?