Why can't I select a null value in a ComboBox?

后端 未结 10 2088
花落未央
花落未央 2020-12-08 06:11

In WPF, it seems to be impossible to select (with the mouse) a \"null\" value from a ComboBox. Edit To clarify, this is .NET 3.5 SP1.

Here\'s some c

10条回答
  •  旧巷少年郎
    2020-12-08 06:53

    this might not address your answer completely, but hopefully its a hit in the right direction:

    1. Have you installed SP1?

    From Scott Gu's Blog:

    • NET 3.5 SP1 includes several data binding and editing improvements to
      WPF. These include:
    • StringFormat support within {{ Binding }} expressions to enable easy formatting of bound values
    • New alternating rows support within controls derived from ItemsControl, which makes it easier to set alternating properties on rows (for example: alternating background colors)
    • Better handling and conversion support for null values in editable controls Item-level validation that applies validation rules to an entire bound item
    • MultiSelector support to handle multi-selection and bulk editing scenarios
    • IEditableCollectionView support to interface data controls to data sources and enable editing/adding/removing items in a transactional way
    • Performance improvements when binding to IEnumerable data sources

    Sorry if I wasted your time and this was not even close..but I think the problem is inherited from:

    constraints of the strongly typed dataset

    NullValueDataSet Explained here

    But now the SP1 for .Net 3.5 should have addressed this issue..

提交回复
热议问题