Visual studio creating automatically Form pro edit, delete and add row in DataTable (creating ToolBar with buttons Add, Delete, Update and Form with controls for editing, viewing data in DataTable. But, I do not find way, how to modify code for adding new row to DataTable, so that the user can not insert data into a form that is already contained.
Example: First control is ComboBox - User. This control is used for entering Name User (over his ID). Second control is ComboBox - Car. This control is used for entering car (over his ID) for business trip. How do I make the content control ComboBox - Car (and code for filtering data only during add new row to DataTable) that in ComboBox - Car not offered values which are already stored in the DataTable? (Example User with Id=1 use Car with Id=1, so ComboBox - Car do not have value 1, if I am change User to Id=2, ComboBox - Car refresh content and has only values, which will not duplicity rows in DataTable for user with Id=2).
I will be grateful for any tip or help.
Jaroslav