Hi,
I'm creating a XamComboEditor that is bound to an ItemsSource. I set the combo editor to IsReadOnly=true and IsEditable=False, but the value can still be changed by using the drop down arrow. I'm using infragistics 9.1. Here is my code:
<infraEditors:XamComboEditor ItemsSource={..binding..} IsEditable="False" IsReadOnly="True"/>
Is this a bug?
Mike
No, this is consistent with the same properties on the WPF ComboBox. Essentially ReadOnly controls the ReadOnly state of the contained textbox which gives you a dropdown list style functionality which allows copy/paste of the text within the edit area.
Hi
Thanks for the response. That seems contrary to the documentation for XamComboBox.IsEditable:
// Remarks: // If IsEditable is set to False, the textbox portion of the editor is not // editable. It will not let you enter any text. In this mode the only way to // modify the value of editor is to select an item from the drop down. This // differs from Infragistics.Windows.Editors.ValueEditor.ReadOnly property in // that the ReadOnly doesn't let you modify the value of the editor at all. // Infragistics.Windows.Editors.ValueEditor.ReadOnly
From this I gather that IsEditable prevents the TextBox from being edited, whereas IsReadOnly should prevent selecting from a dropdown and "modifying the value of the editor at all".
Either way, how can I make the combo box's value not changable at all (except possibly by changing the value of XamComboBox.Value.
Thanks
Well that's how ReadOnly is used within the other ValueEditors but not how its used within the XamComboEditor - again this is identical to the WPF combobox utilization which is why it was specifically set up this way. With regards to preventing manipulation of the value you would need to disable the control.
Hi, has this IsReadOnly behaviour in XamComboBox been implemented yet?
While I can understand the confusion, the WPF combobox has the same two properties and behaves exactly the same. The original decision was to pattern the behavior/compatibility after the intrinsic control. Note, IsReadOnly and IsEditable do not do the same thing. IsEditable determines if the combobox uses a TextBox. IsReadOnly determines the IsReadOnly state of that TextBox. If the control should not be modified then you probably want to set its IsEnabled to false. That being said, we have received several requests for the IsReadOnly behavior of the xamComboEditor to be consistent with that of the other ValueEditor implementations and will look into changing this behavior in a future release.
I thought I'd bump this because I'm running into the same problem and I'm as shocked as the original poster. You have two properties (IsEditable and IsReadOnly) that do the same thing, and no property that will prevent the user from clicking the dropdown and selecting a new item thereby changing the value.
You have documentation that tells us one that the IsReadOnly will do what we expect and yet it's "working as designed"?
The "workaround" is pretty weak as well.
Maybe this will be fixed in Friday's much anticipated release...
One other possibility would be to change the EditTemplate such that it doesn't contain a combobox - e.g. just a textbox.