views:

65

answers:

1

I have a form (WinForms) with a TextBox Binded to a Datasource.

The datasource is a LinQ To SQL query returning one single row. This row have only one filed, varchar(100), not nullable.

My problem is that if the user go to the field (with the focus), he can't exit while he insert a data because the data field cannot accept null.

It is possible to bind a TextBox to a field not nullable and not validate each single filed but the entire form ?

Thank You!

A: 

You can bind one-way, but then you'll have to update the L2S entity manually when the user clicks "save" or "ok."

You could also provide a default value, so the user can tab through the textbox, but you might see that default value appearing in your database.

Jay