Initialize user aded row in a DataGridView




which is the standard way to initialize a typed dataset row with Guid
and DateTime columns when the user adds a new row in a bound
datagridView by clicking in the last row?

I can not set default values for some columns in the typed dataTable
because they are Guid's and DateTimes.
I can not do it in the rowChanged event either because before it fires
the datagridview throws an exception "The column xxx can not be null".

I am catching now the grid's UserAddedRow event, but It gives a
reference to the DataGridViewRow and I can't get the underlying row to
initialize it, so in the event I have to get the bindingSource.Current
object wich is the DataRow, but sometimes is not the added row!

thank you


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question