I've got a list of Validation objects - validations.
public class Validation
{
public IList<KeyValuePair<string, string>> Arguments
{ //(...) }
}
On a form there is a list bound to validations list and a DataGridView bound to Arguments list of current Validation from validations list. I allow user to edit selected Validation object in a dialog window. The user can modify Arguments collection. After closing the window the items displayed in the DataGridView should refresh. They don't. Also if the Arguments list is empty after editing, the IndexOutOfRangeException is thrown.
How can I make it work?