I'm stumbling on this data converter stuff, especially with relation to multiple rows and dynamically show/hide an image.
Lets take a master/detail data perspective. On a given view (presentation), I have header information and a data grid showing a bunch of line items. Before saving the line items, there could be one or more rows having missing/invalid data. I want to display a graphic image to the left of the line item giving the user some visual cue that ...hey, this row needs to be fixed...
So, I have a datatable on my ViewModel that has an extra column indicating if there are errors associated with the row as boolean as datatable column types have no idea how to handle the wpf "visibility" data type. This datatable.DefaultView is the actual basis of displaying the data (which works). I'm just stuck on this final getting the image to dynamically show/hide properly.
I've read about converters, and have a class that does nothing but act as the converter. So, I can only suggest the following for those who can offer help.
My ViewModel has a property exposing the DefaultView
public DataView MyDetailView
{ get { return MyTable.DefaultView; }}
For simplicity, this table has two columns..
RecordIsInvalid (boolean),
LineItem (int)