How can I handle ComboBox selected index changing?

前端 未结 10 1246
花落未央
花落未央 2020-12-21 06:10

I have a ComboBox that have a list of manufacturers. When a user selects a manufacturer, a grid below is populated with data for the chosen manufacturer. That data can be mo

10条回答
  •  悲哀的现实
    2020-12-21 06:37

    If you wonder how you can receive notification when the selection changes, you can subscribe to the ComboBox.SelectedIndexChanged event.

    If you want to offer the user the option to save, only when something has changed and she has forgotten so save her changes, you need to keep track of when these other fields change. This could be accomplished by maintaining a boolean value which is set to true whenever the user edits any fields. When the mentioned event occurs, check this value before deciding whether to offer the option to save.

提交回复
热议问题