Wrap a list to add an empty row for UI binding.
Posted
by
TheSean
on Stack Overflow
See other posts from Stack Overflow
or by TheSean
Published on 2011-01-11T13:09:58Z
Indexed on
2011/01/11
15:53 UTC
Read the original article
Hit count: 179
I am binding a List to a UI Control. My list does not contain a blank row, but I need to add one to allow the user to select blank. However, I'm using the same list in other parts of the application (users can edit/add/delete items) where it doesn't make sense to show a blank row.
My idea is to create a wrapper around the list which adds a blank row just for the UI. The wrapper would hold a reference so that updates to the list (from other parts of the app) would be reflected in UI without any extra work.
I have tried a few different ways, but nothing has worked out for me yet. Can anyone solve this problem?
© Stack Overflow or respective owner