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.

Parents
No Data
Reply
  • 138253
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking through it and I created a sample project for you showing the functionality you want. Note that in the sample the Field is of Double type. Please let me know if this is what you are trying to achieve or I have misunderstood you in some way.

     

    Looking forward for your reply.

    WpfApplication1.zip
Children