EpiListPickerPanel: Updating DataView is not updating lists when source is changed

I’m trying to do a custom List Picker to output some data based on serial numbers for a part. When the form loads, the list is empty. Upon putting in a part number, the Source list box fills with all available serial numbers. If I then remove the part number or enter a part that is not serial number tracked, the list is disabled but it still contains all of the data. If I put in another part number that requires serial numbers it’s not updating there. It’s only getting the first list:

In order to get the source list to fill initially I call oTrans.NotifyAll(). When I debug in Visual Studio, the underlying dataviews have the correct data. Is there a better way to notify controls after a dataview update?

oTrans.NotifyAll() doesnt always do the trick for me so I always just do it indivually.

// Notify ListView
EpiDataView lv = this.oTrans.Factory("ListView");
lv.Notify(new EpiNotifyArgs(this.oTrans, this.edvUD100.Row, EpiTransaction.NotifyType.Initialize));

// Notify that data was updated.
this.edvUD100.Notify(new EpiNotifyArgs(this.oTrans, this.edvUD100.Row, EpiTransaction.NotifyType.Initialize));
1 Like

So you do these calls after you change the data in the view? When I tried this I didn’t get any data.

Ok, I stuck with the NotifyAll. It seems to work now. I had to create my own class which inherited the EpiListPickerPanel class. Then I could clear the Source and Target lists. Just doing that allowed those lists to update normally.