Quantcast
Channel: Problem on validation in Listview
Viewing all articles
Browse latest Browse all 8

Problem on validation in Listview

$
0
0
I have a very similar situation to yours, but need to know if there are any failed validations in any of the ListView cells for the currently editing row, before allowing the user to move to another row.

From what I have read, it looks like triggers based on Validation.HasError are based on the WPF element participating in the Binding. 

Is there any way to determine that the object to which these WPF elements are bound has one or more validation failures.

What I'm thinking, but can't pinpoint how to accomplish it is to set a property in the data object (either trigger or in code) when a there is at least one validation, so that I can refer to it in the ListView.SelectedItem and decide if user can move or not.

I've seen the examples of binding from Validation.HasError on an element to another property, but since I'm in a ListView with all different cell templates, even if I wanted to bind to all the various elements, I dont have a central place to coordinate all of them.

Make any sense?


Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>