Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
Edit by selecting from combo or typing a value manually
posted

Hi,

when editing a cell in XamDataGrid I'd like either select a value from predefined values (using ComboBox) or type a value by myself.

For example imagine Double value which could be entered as number manually (12.5454) or selected from combo containing named boundaries (MaxValue, MinValue). When selecting the value from combo, it should become value of the cell. Here is the problem - I'd like to have string in cell of type Double.

Please find what I have now attached. I tried to set XamComboEditor for the field. This shows combo, user can type the value manually, but after he/she exists the sell, manually entered value is overwritten by the first value from combo.

<Style x:Key="StatusFieldStyle" TargetType="{x:Type e:XamComboEditor}">
  <Setter Property="ItemsProvider" Value="{StaticResource StatusItemsProvider}" />
  <Setter Property="IsEditable" Value="True" />
</Style>

Any help appreciated.